diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-11-29 12:50:10 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-11-30 12:30:50 -0800 |
commit | f87ef3f72a6f2beda88bdc25dfbdeb169332603b (patch) | |
tree | 101a34d7ba78467ced9d9fdaa516717a2e6c6d87 /test/tile | |
parent | 01510619474d109e8eb80a4e328758007850dc72 (diff) | |
download | qtlocation-mapboxgl-f87ef3f72a6f2beda88bdc25dfbdeb169332603b.tar.gz |
[core] OverscaledTileID::isChildOf should check wrap values.
Fixes issue #13478
Diffstat (limited to 'test/tile')
-rw-r--r-- | test/tile/tile_id.test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/tile/tile_id.test.cpp b/test/tile/tile_id.test.cpp index 2f328b78d7..f2de13653f 100644 --- a/test/tile/tile_id.test.cpp +++ b/test/tile/tile_id.test.cpp @@ -186,6 +186,7 @@ TEST(TileID, Overscaled) { EXPECT_TRUE(OverscaledTileID(4, 2, 3).isChildOf(OverscaledTileID(3, 1, 1))); EXPECT_TRUE(OverscaledTileID(5, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(3, 1, 1))); EXPECT_TRUE(OverscaledTileID(6, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(3, 1, 1))); + EXPECT_FALSE(OverscaledTileID(6, -1, { 4, 2, 3 }).isChildOf(OverscaledTileID(3, 1, 1))); EXPECT_TRUE(OverscaledTileID(7, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(3, 1, 1))); EXPECT_FALSE(OverscaledTileID(2, 0, 0).isChildOf(OverscaledTileID(5, 0, { 4, 2, 3 }))); @@ -194,6 +195,7 @@ TEST(TileID, Overscaled) { EXPECT_FALSE(OverscaledTileID(5, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(5, 0, { 4, 2, 3 }))); EXPECT_TRUE(OverscaledTileID(6, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(5, 0, { 4, 2, 3 }))); EXPECT_TRUE(OverscaledTileID(7, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(5, 0, { 4, 2, 3 }))); + EXPECT_FALSE(OverscaledTileID(7, 1, { 4, 2, 3 }).isChildOf(OverscaledTileID(5, 0, { 4, 2, 3 }))); EXPECT_FALSE(OverscaledTileID(2, 0, 0).isChildOf(OverscaledTileID(6, 0, { 4, 2, 3 }))); EXPECT_FALSE(OverscaledTileID(3, 1, 1).isChildOf(OverscaledTileID(6, 0, { 4, 2, 3 }))); @@ -201,7 +203,8 @@ TEST(TileID, Overscaled) { EXPECT_FALSE(OverscaledTileID(5, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(6, 0, { 4, 2, 3 }))); EXPECT_FALSE(OverscaledTileID(6, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(6, 0, { 4, 2, 3 }))); EXPECT_TRUE(OverscaledTileID(7, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(6, 0, { 4, 2, 3 }))); - + EXPECT_FALSE(OverscaledTileID(7, 0, { 4, 2, 3 }).isChildOf(OverscaledTileID(6, -1, { 4, 2, 3 }))); + EXPECT_FALSE(OverscaledTileID(2, 0, 0).isChildOf(OverscaledTileID(5, 0, { 4, 0, 0 }))); EXPECT_FALSE(OverscaledTileID(3, 1, 1).isChildOf(OverscaledTileID(5, 0, { 4, 0, 0 }))); EXPECT_FALSE(OverscaledTileID(4, 2, 3).isChildOf(OverscaledTileID(5, 0, { 4, 0, 0 }))); |