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/storage | |
parent | aa4dff1095e8f5e8ad584f5f7dcab3e61d8cf8ee (diff) | |
download | qtlocation-mapboxgl-50fd9175109e01c5286d3363df21aeba6e89087b.tar.gz |
Fast tileCount with help from @mapbox/sphericalmercator module
Diffstat (limited to 'test/storage')
-rw-r--r-- | test/storage/offline.test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/storage/offline.test.cpp b/test/storage/offline.test.cpp index 0faaabc298..e7ebe5199f 100644 --- a/test/storage/offline.test.cpp +++ b/test/storage/offline.test.cpp @@ -52,3 +52,11 @@ TEST(OfflineTilePyramidRegionDefinition, TileCoverWrapped) { EXPECT_EQ((std::vector<CanonicalTileID>{ { 0, 0, 0 } }), region.tileCover(SourceType::Vector, 512, { 0, 22 })); } + +TEST(OfflineTilePyramidRegionDefinition, TileCount) { + OfflineTilePyramidRegionDefinition region("", sanFranciscoWrapped, 0, 22, 1.0); + + //These numbers match the count from tileCover().size(). + EXPECT_EQ(38424u, region.tileCount(SourceType::Vector, 512, { 10, 18 })); + EXPECT_EQ(9675240u, region.tileCount(SourceType::Vector, 512, { 3, 22 })); +} |