summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-10-31 14:48:08 -0700
committerChris Loer <chris.loer@mapbox.com>2017-11-01 10:49:07 -0700
commit9841621f0b0dc96e777230f7a89faef7ca023783 (patch)
treee38c020281b264c945b702d1c09752801c266a74
parent9e19cbb58cc0066e595204d86045d9acad2b9033 (diff)
downloadqtlocation-mapboxgl-9841621f0b0dc96e777230f7a89faef7ca023783.tar.gz
Update unit test stubs to match new collision code.
Disable annotation_tile test -- seems like maybe it makes sense to delete?
-rw-r--r--test/gl/bucket.test.cpp4
-rw-r--r--test/tile/annotation_tile.test.cpp8
-rw-r--r--test/tile/geojson_tile.test.cpp2
-rw-r--r--test/tile/vector_tile.test.cpp5
4 files changed, 12 insertions, 7 deletions
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp
index 0e73dfb28f..f43fedb1c3 100644
--- a/test/gl/bucket.test.cpp
+++ b/test/gl/bucket.test.cpp
@@ -109,9 +109,11 @@ TEST(Buckets, SymbolBucket) {
style::SymbolLayoutProperties::PossiblyEvaluated layout;
bool sdfIcons = false;
bool iconsNeedLinear = false;
+ bool sortFeaturesByY = false;
+ std::vector<SymbolInstance> symbolInstances;
gl::Context context;
- SymbolBucket bucket { layout, {}, 16.0f, 1.0f, 0, sdfIcons, iconsNeedLinear };
+ SymbolBucket bucket { layout, {}, 16.0f, 1.0f, 0, sdfIcons, iconsNeedLinear, sortFeaturesByY, symbolInstances };
ASSERT_FALSE(bucket.hasIconData());
ASSERT_FALSE(bucket.hasTextData());
ASSERT_FALSE(bucket.hasCollisionBoxData());
diff --git a/test/tile/annotation_tile.test.cpp b/test/tile/annotation_tile.test.cpp
index b637fcf4a3..0107bbec4c 100644
--- a/test/tile/annotation_tile.test.cpp
+++ b/test/tile/annotation_tile.test.cpp
@@ -6,7 +6,6 @@
#include <mbgl/map/transform.hpp>
#include <mbgl/renderer/tile_parameters.hpp>
#include <mbgl/renderer/query.hpp>
-#include <mbgl/text/collision_tile.hpp>
#include <mbgl/geometry/feature_index.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/annotation/annotation_tile.hpp>
@@ -47,8 +46,13 @@ public:
};
};
+// 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);
@@ -91,5 +95,7 @@ TEST(AnnotationTile, Issue8289) {
tile.queryRenderedFeatures(result, queryGeometry, transformState, {}, options);
EXPECT_TRUE(result.empty());
+ */
+
}
diff --git a/test/tile/geojson_tile.test.cpp b/test/tile/geojson_tile.test.cpp
index 953c3b8a5f..c05e04bc8d 100644
--- a/test/tile/geojson_tile.test.cpp
+++ b/test/tile/geojson_tile.test.cpp
@@ -66,7 +66,6 @@ TEST(GeoJSONTile, Issue7648) {
tile.setLayers({{ layer.baseImpl }});
tile.setObserver(&observer);
- tile.setPlacementConfig({});
while (!tile.isComplete()) {
test.loop.runOnce();
@@ -93,7 +92,6 @@ TEST(GeoJSONTile, Issue9927) {
GeoJSONTile tile(OverscaledTileID(0, 0, 0), "source", test.tileParameters, features);
tile.setLayers({{ layer.baseImpl }});
- tile.setPlacementConfig({});
while (!tile.isComplete()) {
test.loop.runOnce();
diff --git a/test/tile/vector_tile.test.cpp b/test/tile/vector_tile.test.cpp
index 7e8b659b7a..5963e7f154 100644
--- a/test/tile/vector_tile.test.cpp
+++ b/test/tile/vector_tile.test.cpp
@@ -11,7 +11,6 @@
#include <mbgl/renderer/tile_parameters.hpp>
#include <mbgl/renderer/buckets/symbol_bucket.hpp>
#include <mbgl/renderer/query.hpp>
-#include <mbgl/text/collision_tile.hpp>
#include <mbgl/geometry/feature_index.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/renderer/image_manager.hpp>
@@ -71,12 +70,13 @@ TEST(VectorTile, Issue7615) {
VectorTile tile(OverscaledTileID(0, 0, 0), "source", test.tileParameters, test.tileset);
style::SymbolLayer symbolLayer("symbol", "source");
+ std::vector<SymbolInstance> symbolInstances;
auto symbolBucket = std::make_shared<SymbolBucket>(
style::SymbolLayoutProperties::PossiblyEvaluated(),
std::map<
std::string,
std::pair<style::IconPaintProperties::PossiblyEvaluated, style::TextPaintProperties::PossiblyEvaluated>>(),
- 16.0f, 1.0f, 0.0f, false, false);
+ 16.0f, 1.0f, 0.0f, false, false, false, symbolInstances);
// Simulate placement of a symbol layer.
tile.onPlacement(GeometryTile::PlacementResult {
@@ -84,7 +84,6 @@ TEST(VectorTile, Issue7615) {
symbolLayer.getID(),
symbolBucket
}},
- nullptr,
{},
{},
}, 0);