Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1167 from mapbox/style-url-tests
Browse files Browse the repository at this point in the history
add style URL tests
  • Loading branch information
incanus committed Mar 31, 2015
2 parents f2e658d + 7808545 commit 1cf4799
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/miscellaneous/mapbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1cf4799

Please sign in to comment.