summaryrefslogtreecommitdiff
path: root/test/style/style.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-02-18 10:48:51 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-02-18 15:15:24 -0800
commit7b39ce95210ceb6640b3a3399dacd1d0e826ac1f (patch)
treeeb97fdc8a284826d3a3fe9426a8a10f88a654799 /test/style/style.cpp
parentd5eb5240f8c35016927e89bf9d186addc09b83fa (diff)
downloadqtlocation-mapboxgl-7b39ce95210ceb6640b3a3399dacd1d0e826ac1f.tar.gz
[core] Remove ThreadContext::getFileSource; instead thread FileSource through
Diffstat (limited to 'test/style/style.cpp')
-rw-r--r--test/style/style.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/style/style.cpp b/test/style/style.cpp
index 59366ea7dd..b4211cb071 100644
--- a/test/style/style.cpp
+++ b/test/style/style.cpp
@@ -1,4 +1,5 @@
#include "../fixtures/util.hpp"
+#include "../fixtures/stub_file_source.hpp"
#include <mbgl/map/map_data.hpp>
#include <mbgl/style/style.hpp>
@@ -7,11 +8,13 @@
using namespace mbgl;
TEST(Style, UnusedSource) {
+ util::RunLoop loop;
util::ThreadContext context { "Map", util::ThreadType::Map, util::ThreadPriority::Regular };
util::ThreadContext::Set(&context);
MapData data { MapMode::Still, GLContextMode::Unique, 1.0 };
- Style style { data };
+ StubFileSource fileSource;
+ Style style { data, fileSource };
style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"), "");
style.cascade();
@@ -27,11 +30,13 @@ TEST(Style, UnusedSource) {
}
TEST(Style, UnusedSourceActiveViaClassUpdate) {
+ util::RunLoop loop;
util::ThreadContext context { "Map", util::ThreadType::Map, util::ThreadPriority::Regular };
util::ThreadContext::Set(&context);
MapData data { MapMode::Still, GLContextMode::Unique, 1.0 };
- Style style { data };
+ StubFileSource fileSource;
+ Style style { data, fileSource };
data.addClass("visible");