summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2015-03-31 13:54:51 -0700
committerJustin R. Miller <incanus@codesorcery.net>2015-03-31 13:54:51 -0700
commit78085458f5fa35986ac0c88e3e485d7f67ce2d78 (patch)
tree4b492f8ebeb09fb45e249e3514c65f3dcf4f9519 /test
parent1bb04ce65b4bb070b5df9e860e85123634a41184 (diff)
downloadqtlocation-mapboxgl-78085458f5fa35986ac0c88e3e485d7f67ce2d78.tar.gz
add style URL tests
Diffstat (limited to 'test')
-rw-r--r--test/miscellaneous/mapbox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/miscellaneous/mapbox.cpp b/test/miscellaneous/mapbox.cpp
index 926c842e22..1aff2494a4 100644
--- a/test/miscellaneous/mapbox.cpp
+++ b/test/miscellaneous/mapbox.cpp
@@ -18,6 +18,11 @@ TEST(Mapbox, GlyphsURL) {
EXPECT_EQ(mbgl::util::mapbox::normalizeGlyphsURL("http://path", "key"), "http://path");
}
+TEST(Mapbox, StyleURL) {
+ EXPECT_EQ(mbgl::util::mapbox::normalizeStyleURL("mapbox://user.style", "key"), "https://api.tiles.mapbox.com/styles/v1/user/user.style?access_token=key");
+ EXPECT_EQ(mbgl::util::mapbox::normalizeStyleURL("http://path", "key"), "http://path");
+}
+
TEST(Mapbox, TileURL) {
try {
EXPECT_EQ(mbgl::util::mapbox::normalizeTileURL("http://path.png/tile.png", "mapbox://user.map", SourceType::Raster), "http://path.png/tile{ratio}.png");