diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-04-19 18:25:50 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-04-20 09:38:18 +0200 |
commit | 9a9408e8111bcdcd0fcb9a93112d61ab8fce0601 (patch) | |
tree | 1498222077d463ad4b8a3b1fb479696de6716512 /test/tile | |
parent | 7ddca3b6116903bae9ecde1d49d29a8f1fedcec3 (diff) | |
download | qtlocation-mapboxgl-9a9408e8111bcdcd0fcb9a93112d61ab8fce0601.tar.gz |
[core] Render parent raster tiles when ideal tile can't be loaded
Diffstat (limited to 'test/tile')
-rw-r--r-- | test/tile/raster_tile.test.cpp | 8 | ||||
-rw-r--r-- | test/tile/vector_tile.test.cpp | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/test/tile/raster_tile.test.cpp b/test/tile/raster_tile.test.cpp index 5cfc274be0..d0252555ac 100644 --- a/test/tile/raster_tile.test.cpp +++ b/test/tile/raster_tile.test.cpp @@ -40,6 +40,8 @@ TEST(RasterTile, setError) { RasterTile tile(OverscaledTileID(0, 0, 0), test.updateParameters, test.tileset); tile.setError(std::make_exception_ptr(std::runtime_error("test"))); EXPECT_FALSE(tile.isRenderable()); + EXPECT_TRUE(tile.isLoaded()); + EXPECT_TRUE(tile.isComplete()); } TEST(RasterTile, onError) { @@ -47,6 +49,8 @@ TEST(RasterTile, onError) { RasterTile tile(OverscaledTileID(0, 0, 0), test.updateParameters, test.tileset); tile.onError(std::make_exception_ptr(std::runtime_error("test"))); EXPECT_FALSE(tile.isRenderable()); + EXPECT_TRUE(tile.isLoaded()); + EXPECT_TRUE(tile.isComplete()); } TEST(RasterTile, onParsed) { @@ -54,6 +58,8 @@ TEST(RasterTile, onParsed) { RasterTile tile(OverscaledTileID(0, 0, 0), test.updateParameters, test.tileset); tile.onParsed(std::make_unique<RasterBucket>(UnassociatedImage{})); EXPECT_TRUE(tile.isRenderable()); + EXPECT_TRUE(tile.isLoaded()); + EXPECT_TRUE(tile.isComplete()); } TEST(RasterTile, onParsedEmpty) { @@ -61,4 +67,6 @@ TEST(RasterTile, onParsedEmpty) { RasterTile tile(OverscaledTileID(0, 0, 0), test.updateParameters, test.tileset); tile.onParsed(nullptr); EXPECT_FALSE(tile.isRenderable()); + EXPECT_TRUE(tile.isLoaded()); + EXPECT_TRUE(tile.isComplete()); } diff --git a/test/tile/vector_tile.test.cpp b/test/tile/vector_tile.test.cpp index a388e8937e..0f43645d49 100644 --- a/test/tile/vector_tile.test.cpp +++ b/test/tile/vector_tile.test.cpp @@ -46,13 +46,17 @@ TEST(VectorTile, setError) { VectorTile tile(OverscaledTileID(0, 0, 0), "source", test.updateParameters, test.tileset); tile.setError(std::make_exception_ptr(std::runtime_error("test"))); EXPECT_FALSE(tile.isRenderable()); + EXPECT_TRUE(tile.isLoaded()); + EXPECT_TRUE(tile.isComplete()); } TEST(VectorTile, onError) { VectorTileTest test; VectorTile tile(OverscaledTileID(0, 0, 0), "source", test.updateParameters, test.tileset); tile.onError(std::make_exception_ptr(std::runtime_error("test"))); - EXPECT_TRUE(tile.isRenderable()); + EXPECT_FALSE(tile.isRenderable()); + EXPECT_TRUE(tile.isLoaded()); + EXPECT_TRUE(tile.isComplete()); } TEST(VectorTile, Issue7615) { |