diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-10-17 16:28:31 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-10-22 11:53:45 +0200 |
commit | 7303977ae7df8f55b849f0069b919bd63ac78dd5 (patch) | |
tree | 25bc1f903144ad754116037f04de8c2e5cbbec7c /test/util/url.test.cpp | |
parent | ee2a1a855eebcf1572199a5e3d2d96047c2bbb6a (diff) | |
download | qtlocation-mapboxgl-7303977ae7df8f55b849f0069b919bd63ac78dd5.tar.gz |
[core] don't use <sstream> and <iomanip> for string construction
Diffstat (limited to 'test/util/url.test.cpp')
-rw-r--r-- | test/util/url.test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/util/url.test.cpp b/test/util/url.test.cpp index 55d8af2811..24697c42fa 100644 --- a/test/util/url.test.cpp +++ b/test/util/url.test.cpp @@ -6,6 +6,14 @@ using namespace mbgl::util; +TEST(URL, percentEncode) { + EXPECT_EQ("%22%C3%A9nc%C3%B8%C3%B0ing%22", percentEncode("\"éncøðing\"")); +} + +TEST(URL, percentDecode) { + EXPECT_EQ("\"éncøðing\"", percentDecode("%22%C3%A9nc%C3%B8%C3%B0ing%22")); +} + TEST(URL, Scheme) { EXPECT_EQ(URL::Segment({ 0, 4 }), URL("http://example.com/test?query=foo").scheme); EXPECT_EQ(URL::Segment({ 0, 4 }), URL("http://127.0.0.1:8080/test?query=foo").scheme); |