From 78085458f5fa35986ac0c88e3e485d7f67ce2d78 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Tue, 31 Mar 2015 13:54:51 -0700 Subject: [PATCH] add style URL tests --- test/miscellaneous/mapbox.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/miscellaneous/mapbox.cpp b/test/miscellaneous/mapbox.cpp index 926c842e2..1aff2494a 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");