summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-06-22 14:33:21 -0700
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-07-18 10:45:12 +0200
commite35cbbae55ab01f33690b1bb2e918c5f8393b854 (patch)
tree9c4a1d27c7ef3e8e0edf5076ee1404f2a3c2aa29 /test
parent8ae70105463db78699ef3743fb24503ed8feb054 (diff)
downloadqtlocation-mapboxgl-e35cbbae55ab01f33690b1bb2e918c5f8393b854.tar.gz
[core] mutate style on annotation mutations immediately
Diffstat (limited to 'test')
-rw-r--r--test/style/source.test.cpp4
-rw-r--r--test/tile/annotation_tile.test.cpp8
-rw-r--r--test/tile/geojson_tile.test.cpp4
-rw-r--r--test/tile/raster_tile.test.cpp4
-rw-r--r--test/tile/vector_tile.test.cpp4
5 files changed, 17 insertions, 7 deletions
diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp
index 8b9cda1db3..919260ffe9 100644
--- a/test/style/source.test.cpp
+++ b/test/style/source.test.cpp
@@ -3,6 +3,7 @@
#include <mbgl/test/stub_style_observer.hpp>
#include <mbgl/test/stub_render_source_observer.hpp>
+#include <mbgl/style/style.hpp>
#include <mbgl/style/source_impl.hpp>
#include <mbgl/style/sources/raster_source.hpp>
#include <mbgl/style/sources/vector_source.hpp>
@@ -47,7 +48,8 @@ public:
Transform transform;
TransformState transformState;
ThreadPool threadPool { 1 };
- AnnotationManager annotationManager;
+ Style style { loop, fileSource, 1 };
+ AnnotationManager annotationManager { style };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };
diff --git a/test/tile/annotation_tile.test.cpp b/test/tile/annotation_tile.test.cpp
index 813b813220..739307b78a 100644
--- a/test/tile/annotation_tile.test.cpp
+++ b/test/tile/annotation_tile.test.cpp
@@ -16,6 +16,7 @@
#include <mbgl/text/glyph_manager.hpp>
#include <mbgl/map/backend_scope.hpp>
#include <mbgl/gl/headless_backend.hpp>
+#include <mbgl/style/style.hpp>
#include <memory>
@@ -27,10 +28,11 @@ public:
TransformState transformState;
util::RunLoop loop;
ThreadPool threadPool { 1 };
- AnnotationManager annotationManager;
+ style::Style style { loop, fileSource, 1 };
+ AnnotationManager annotationManager { style };
HeadlessBackend backend { test::sharedDisplay() };
BackendScope scope { backend };
- RenderStyle style { threadPool, fileSource };
+ RenderStyle renderStyle { threadPool, fileSource };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };
@@ -92,7 +94,7 @@ TEST(AnnotationTile, Issue8289) {
TransformState transformState;
RenderedQueryOptions options;
- tile.queryRenderedFeatures(result, queryGeometry, transformState, test.style, options);
+ tile.queryRenderedFeatures(result, queryGeometry, transformState, test.renderStyle, options);
EXPECT_TRUE(result.empty());
}
diff --git a/test/tile/geojson_tile.test.cpp b/test/tile/geojson_tile.test.cpp
index 52f7a20f00..31fb8c1fd0 100644
--- a/test/tile/geojson_tile.test.cpp
+++ b/test/tile/geojson_tile.test.cpp
@@ -8,6 +8,7 @@
#include <mbgl/util/run_loop.hpp>
#include <mbgl/map/transform.hpp>
#include <mbgl/renderer/tile_parameters.hpp>
+#include <mbgl/style/style.hpp>
#include <mbgl/style/layers/circle_layer.hpp>
#include <mbgl/annotation/annotation_manager.hpp>
#include <mbgl/renderer/image_manager.hpp>
@@ -24,7 +25,8 @@ public:
TransformState transformState;
util::RunLoop loop;
ThreadPool threadPool { 1 };
- AnnotationManager annotationManager;
+ style::Style style { loop, fileSource, 1 };
+ AnnotationManager annotationManager { style };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };
Tileset tileset { { "https://example.com" }, { 0, 22 }, "none" };
diff --git a/test/tile/raster_tile.test.cpp b/test/tile/raster_tile.test.cpp
index 4680e7f485..e96e09bacf 100644
--- a/test/tile/raster_tile.test.cpp
+++ b/test/tile/raster_tile.test.cpp
@@ -3,6 +3,7 @@
#include <mbgl/tile/raster_tile.hpp>
#include <mbgl/tile/tile_loader_impl.hpp>
+#include <mbgl/style/style.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/map/transform.hpp>
@@ -20,7 +21,8 @@ public:
TransformState transformState;
util::RunLoop loop;
ThreadPool threadPool { 1 };
- AnnotationManager annotationManager;
+ style::Style style { loop, fileSource, 1 };
+ AnnotationManager annotationManager { style };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };
Tileset tileset { { "https://example.com" }, { 0, 22 }, "none" };
diff --git a/test/tile/vector_tile.test.cpp b/test/tile/vector_tile.test.cpp
index d7ad3c999d..b0fee28edf 100644
--- a/test/tile/vector_tile.test.cpp
+++ b/test/tile/vector_tile.test.cpp
@@ -7,6 +7,7 @@
#include <mbgl/util/run_loop.hpp>
#include <mbgl/map/transform.hpp>
#include <mbgl/map/query.hpp>
+#include <mbgl/style/style.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/renderer/tile_parameters.hpp>
#include <mbgl/renderer/buckets/symbol_bucket.hpp>
@@ -26,7 +27,8 @@ public:
TransformState transformState;
util::RunLoop loop;
ThreadPool threadPool { 1 };
- AnnotationManager annotationManager;
+ style::Style style { loop, fileSource, 1 };
+ AnnotationManager annotationManager { style };
ImageManager imageManager;
GlyphManager glyphManager { fileSource };
Tileset tileset { { "https://example.com" }, { 0, 22 }, "none" };