summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-11-07 12:55:17 -0800
committerChris Loer <chris.loer@gmail.com>2017-11-07 13:28:00 -0800
commit8a0486ed3c41c216c8de62977cd4efa16db2657d (patch)
treec7ed79f3eb69bad9b781a1288b368677e17a3832
parent777f579493f669badcd0fc069d495f6a910aaefe (diff)
downloadqtlocation-mapboxgl-8a0486ed3c41c216c8de62977cd4efa16db2657d.tar.gz
Remove annotation_tile test. This test exercised the pathway that transferred collision data from the background to the foreground, and that pathway has been removed.
-rw-r--r--cmake/test-files.cmake1
-rw-r--r--test/tile/annotation_tile.test.cpp101
2 files changed, 0 insertions, 102 deletions
diff --git a/cmake/test-files.cmake b/cmake/test-files.cmake
index 5c0a899147..c198c2f80a 100644
--- a/cmake/test-files.cmake
+++ b/cmake/test-files.cmake
@@ -111,7 +111,6 @@ set(MBGL_TEST_FILES
test/text/quads.test.cpp
# tile
- test/tile/annotation_tile.test.cpp
test/tile/geojson_tile.test.cpp
test/tile/geometry_tile_data.test.cpp
test/tile/raster_tile.test.cpp
diff --git a/test/tile/annotation_tile.test.cpp b/test/tile/annotation_tile.test.cpp
deleted file mode 100644
index 0107bbec4c..0000000000
--- a/test/tile/annotation_tile.test.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#include <mbgl/test/util.hpp>
-#include <mbgl/test/fake_file_source.hpp>
-
-#include <mbgl/util/default_thread_pool.hpp>
-#include <mbgl/util/run_loop.hpp>
-#include <mbgl/map/transform.hpp>
-#include <mbgl/renderer/tile_parameters.hpp>
-#include <mbgl/renderer/query.hpp>
-#include <mbgl/geometry/feature_index.hpp>
-#include <mbgl/annotation/annotation_manager.hpp>
-#include <mbgl/annotation/annotation_tile.hpp>
-#include <mbgl/renderer/image_manager.hpp>
-#include <mbgl/text/glyph_manager.hpp>
-#include <mbgl/renderer/backend_scope.hpp>
-#include <mbgl/gl/headless_backend.hpp>
-#include <mbgl/style/style.hpp>
-
-#include <memory>
-
-using namespace mbgl;
-
-class AnnotationTileTest {
-public:
- FakeFileSource fileSource;
- TransformState transformState;
- util::RunLoop loop;
- ThreadPool threadPool { 1 };
- style::Style style { loop, fileSource, 1 };
- AnnotationManager annotationManager { style };
- HeadlessBackend backend;
- BackendScope scope { backend };
- ImageManager imageManager;
- GlyphManager glyphManager { fileSource };
-
- TileParameters tileParameters {
- 1.0,
- MapDebugOptions(),
- transformState,
- threadPool,
- fileSource,
- MapMode::Continuous,
- annotationManager,
- imageManager,
- glyphManager,
- 0
- };
-};
-
-// TODO: Does it make sense to try to port this test to the new CollisionIndex model? The whole pathway this test exercised is basically gone...
-
-// Don't query stale collision tile
-TEST(AnnotationTile, Issue8289) {
-
-/*
-
- AnnotationTileTest test;
- AnnotationTile tile(OverscaledTileID(0, 0, 0), test.tileParameters);
-
- auto data = std::make_unique<AnnotationTileData>();
- data->addLayer("test")->addFeature(0, FeatureType::Point, GeometryCollection());
-
- // Simulate layout and placement of a symbol layer.
- tile.onLayout(GeometryTile::LayoutResult {
- std::unordered_map<std::string, std::shared_ptr<Bucket>>(),
- std::make_unique<FeatureIndex>(),
- std::move(data),
- }, 0);
-
- auto collisionTile = std::make_unique<CollisionTile>(PlacementConfig());
-
- IndexedSubfeature subfeature { 0, "", "", 0 };
- CollisionFeature feature(GeometryCoordinates(), Anchor(0, 0, 0, 0), -5, 5, -5, 5, 1, 0, style::SymbolPlacementType::Point, subfeature);
- collisionTile->insertFeature(feature, 0, true);
- collisionTile->placeFeature(feature, false, false);
-
- tile.onPlacement(GeometryTile::PlacementResult {
- std::unordered_map<std::string, std::shared_ptr<Bucket>>(),
- std::move(collisionTile),
- {},
- {},
- }, 0);
-
- // Simulate a second layout with empty data.
- tile.onLayout(GeometryTile::LayoutResult {
- std::unordered_map<std::string, std::shared_ptr<Bucket>>(),
- std::make_unique<FeatureIndex>(),
- std::make_unique<AnnotationTileData>(),
- }, 0);
-
- std::unordered_map<std::string, std::vector<Feature>> result;
- GeometryCoordinates queryGeometry {{ Point<int16_t>(0, 0) }};
- TransformState transformState;
- RenderedQueryOptions options;
-
- tile.queryRenderedFeatures(result, queryGeometry, transformState, {}, options);
-
- EXPECT_TRUE(result.empty());
- */
-
-}
-