diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-09-01 16:33:35 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-09-08 17:38:42 -0700 |
commit | 50fd9175109e01c5286d3363df21aeba6e89087b (patch) | |
tree | 2f3dfada2896159f3eef64aa3f02ac231742d8a7 /test/util | |
parent | aa4dff1095e8f5e8ad584f5f7dcab3e61d8cf8ee (diff) | |
download | qtlocation-mapboxgl-50fd9175109e01c5286d3363df21aeba6e89087b.tar.gz |
Fast tileCount with help from @mapbox/sphericalmercator module
Diffstat (limited to 'test/util')
-rw-r--r-- | test/util/tile_cover.test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/util/tile_cover.test.cpp b/test/util/tile_cover.test.cpp index c746e6dab5..933c18b5ea 100644 --- a/test/util/tile_cover.test.cpp +++ b/test/util/tile_cover.test.cpp @@ -84,3 +84,12 @@ TEST(TileCover, SanFranciscoZ0Wrapped) { EXPECT_EQ((std::vector<UnwrappedTileID>{ { 0, 1, 0 } }), util::tileCover(sanFranciscoWrapped, 0)); } + +TEST(TileCount, SanFranciscoZ10) { + EXPECT_EQ(4u, util::tileCount(sanFrancisco, 10, util::tileSize)); +} + +TEST(TileCount, SanFranciscoZ22) { + EXPECT_EQ(7254450u, util::tileCount(sanFrancisco, 22, util::tileSize)); +} + |