summaryrefslogtreecommitdiff
path: root/test/util
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-10-17 16:28:31 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-10-23 12:23:40 +0200
commitc87c25cc8407c33e4d88390836a9a52a1626c19e (patch)
tree25bc1f903144ad754116037f04de8c2e5cbbec7c /test/util
parent2766e64973b5f9eadf2e8a1cbbe43334e3e76d76 (diff)
downloadqtlocation-mapboxgl-c87c25cc8407c33e4d88390836a9a52a1626c19e.tar.gz
[core] don't use <sstream> and <iomanip> for string construction
Diffstat (limited to 'test/util')
-rw-r--r--test/util/url.test.cpp8
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);