summaryrefslogtreecommitdiff
path: root/test/style/style.cpp
diff options
context:
space:
mode:
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");