diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-26 16:39:56 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-02 14:51:39 -0700 |
commit | c902f9098b331302aaa1baac77d1575db624a132 (patch) | |
tree | 211901cd04454aedbac40c469198438e46d7038c /test/storage | |
parent | 18149cbcc27a926f280b08d8d0e09104b2147688 (diff) | |
download | qtlocation-mapboxgl-c902f9098b331302aaa1baac77d1575db624a132.tar.gz |
[core] Rationalize naming for style-related code
Diffstat (limited to 'test/storage')
-rw-r--r-- | test/storage/offline.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/storage/offline.cpp b/test/storage/offline.cpp index 3b64c0f50e..06789cd828 100644 --- a/test/storage/offline.cpp +++ b/test/storage/offline.cpp @@ -1,5 +1,5 @@ #include <mbgl/storage/offline.hpp> -#include <mbgl/source/source_info.hpp> +#include <mbgl/util/tileset.hpp> #include <mbgl/tile/tile_id.hpp> #include <gtest/gtest.h> @@ -14,49 +14,49 @@ static const LatLngBounds sanFranciscoWrapped = TEST(OfflineTilePyramidRegionDefinition, TileCoverEmpty) { OfflineTilePyramidRegionDefinition region("", LatLngBounds::empty(), 0, 20, 1.0); - SourceInfo info; + Tileset tileset; - EXPECT_EQ((std::vector<CanonicalTileID>{}), region.tileCover(SourceType::Vector, 512, info)); + EXPECT_EQ((std::vector<CanonicalTileID>{}), region.tileCover(SourceType::Vector, 512, tileset)); } TEST(OfflineTilePyramidRegionDefinition, TileCoverZoomIntersection) { OfflineTilePyramidRegionDefinition region("", sanFrancisco, 2, 2, 1.0); - SourceInfo info; + Tileset tileset; - info.minZoom = 0; + tileset.minZoom = 0; EXPECT_EQ((std::vector<CanonicalTileID>{ { 2, 0, 1 } }), - region.tileCover(SourceType::Vector, 512, info)); + region.tileCover(SourceType::Vector, 512, tileset)); - info.minZoom = 3; - EXPECT_EQ((std::vector<CanonicalTileID>{}), region.tileCover(SourceType::Vector, 512, info)); + tileset.minZoom = 3; + EXPECT_EQ((std::vector<CanonicalTileID>{}), region.tileCover(SourceType::Vector, 512, tileset)); } TEST(OfflineTilePyramidRegionDefinition, TileCoverTileSize) { OfflineTilePyramidRegionDefinition region("", LatLngBounds::world(), 0, 0, 1.0); - SourceInfo info; + Tileset tileset; EXPECT_EQ((std::vector<CanonicalTileID>{ { 0, 0, 0 } }), - region.tileCover(SourceType::Vector, 512, info)); + region.tileCover(SourceType::Vector, 512, tileset)); EXPECT_EQ((std::vector<CanonicalTileID>{ { 1, 0, 0 }, { 1, 0, 1 }, { 1, 1, 0 }, { 1, 1, 1 } }), - region.tileCover(SourceType::Vector, 256, info)); + region.tileCover(SourceType::Vector, 256, tileset)); } TEST(OfflineTilePyramidRegionDefinition, TileCoverZoomRounding) { OfflineTilePyramidRegionDefinition region("", sanFrancisco, 0.6, 0.7, 1.0); - SourceInfo info; + Tileset tileset; EXPECT_EQ((std::vector<CanonicalTileID>{ { 0, 0, 0 } }), - region.tileCover(SourceType::Vector, 512, info)); + region.tileCover(SourceType::Vector, 512, tileset)); EXPECT_EQ((std::vector<CanonicalTileID>{ { 1, 0, 0 } }), - region.tileCover(SourceType::Raster, 512, info)); + region.tileCover(SourceType::Raster, 512, tileset)); } TEST(OfflineTilePyramidRegionDefinition, TileCoverWrapped) { OfflineTilePyramidRegionDefinition region("", sanFranciscoWrapped, 0, 0, 1.0); - SourceInfo info; + Tileset tileset; EXPECT_EQ((std::vector<CanonicalTileID>{ { 0, 0, 0 } }), - region.tileCover(SourceType::Vector, 512, info)); + region.tileCover(SourceType::Vector, 512, tileset)); } |