summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-14 16:15:43 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-15 09:56:18 -0700
commited489e764971b40b01e33e8505f2d31a72a0075e (patch)
tree34acdf5869430f30e27e8666af9d8fc8f7c77d21 /test/style
parent25ff2696a1c6741a5a61334f1bd965e9d5099f05 (diff)
downloadqtlocation-mapboxgl-ed489e764971b40b01e33e8505f2d31a72a0075e.tar.gz
[core] Remove MapData dependency from Style
Diffstat (limited to 'test/style')
-rw-r--r--test/style/source.cpp8
-rw-r--r--test/style/style.cpp18
2 files changed, 12 insertions, 14 deletions
diff --git a/test/style/source.cpp b/test/style/source.cpp
index 9c334c65d5..5ec2714b43 100644
--- a/test/style/source.cpp
+++ b/test/style/source.cpp
@@ -10,12 +10,12 @@
#include <mbgl/platform/log.hpp>
#include <mbgl/map/transform.hpp>
-#include <mbgl/map/map_data.hpp>
#include <mbgl/util/worker.hpp>
#include <mbgl/gl/texture_pool.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/style_update_parameters.hpp>
#include <mbgl/layer/line_layer.hpp>
+#include <mbgl/annotation/annotation_manager.hpp>
using namespace mbgl;
@@ -29,8 +29,8 @@ public:
TransformState transformState;
Worker worker { 1 };
gl::TexturePool texturePool;
- MapData mapData { MapMode::Still, GLContextMode::Unique, 1.0 };
- Style style { mapData, fileSource };
+ AnnotationManager annotationManager { 1.0 };
+ Style style { fileSource, 1.0 };
StyleUpdateParameters updateParameters {
1.0,
@@ -42,7 +42,7 @@ public:
texturePool,
true,
MapMode::Continuous,
- mapData,
+ annotationManager,
style
};
diff --git a/test/style/style.cpp b/test/style/style.cpp
index 03e044ba76..831edfff94 100644
--- a/test/style/style.cpp
+++ b/test/style/style.cpp
@@ -10,15 +10,14 @@ using namespace mbgl;
TEST(Style, UnusedSource) {
util::RunLoop loop;
- MapData data { MapMode::Still, GLContextMode::Unique, 1.0 };
StubFileSource fileSource;
- Style style { data, fileSource };
+ Style style { fileSource, 1.0 };
auto now = Clock::now();
style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"), "");
- style.cascade(now);
- style.recalculate(0, now);
+ style.cascade(now, MapMode::Still);
+ style.recalculate(0, now, MapMode::Still);
Source *usedSource = style.getSource("usedsource");
EXPECT_TRUE(usedSource);
@@ -32,9 +31,8 @@ TEST(Style, UnusedSource) {
TEST(Style, UnusedSourceActiveViaClassUpdate) {
util::RunLoop loop;
- MapData data { MapMode::Still, GLContextMode::Unique, 1.0 };
StubFileSource fileSource;
- Style style { data, fileSource };
+ Style style { fileSource, 1.0 };
style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"), "");
EXPECT_TRUE(style.addClass("visible"));
@@ -42,8 +40,8 @@ TEST(Style, UnusedSourceActiveViaClassUpdate) {
auto now = Clock::now();
- style.cascade(now);
- style.recalculate(0, now);
+ style.cascade(now, MapMode::Still);
+ style.recalculate(0, now, MapMode::Still);
Source *unusedSource = style.getSource("unusedsource");
EXPECT_TRUE(unusedSource);
@@ -55,8 +53,8 @@ TEST(Style, UnusedSourceActiveViaClassUpdate) {
now = Clock::now();
- style.cascade(now);
- style.recalculate(0, now);
+ style.cascade(now, MapMode::Still);
+ style.recalculate(0, now, MapMode::Still);
unusedSource = style.getSource("unusedsource");
EXPECT_TRUE(unusedSource);