summaryrefslogtreecommitdiff
path: root/test/gl/context.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/gl/context.test.cpp')
-rw-r--r--test/gl/context.test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/gl/context.test.cpp b/test/gl/context.test.cpp
index 5703792a7d..a0024f24df 100644
--- a/test/gl/context.test.cpp
+++ b/test/gl/context.test.cpp
@@ -1,6 +1,7 @@
#include <mbgl/test/util.hpp>
#include <mbgl/platform/gl_functions.hpp>
+#include <mbgl/platform/factory.hpp>
#include <mbgl/gl/context.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/map_options.hpp>
@@ -85,13 +86,14 @@ struct Buffer {
TEST(GLContextMode, Shared) {
util::RunLoop loop;
- DefaultFileSource fileSource(":memory:", "test/fixtures/api/assets");
float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, fileSource, {}, GLContextMode::Shared };
+ auto fileSourceOptions = FileSourceOptions().withCachePath(":memory:").withAssetRoot("test/fixtures/api/assets");
+
+ HeadlessFrontend frontend { pixelRatio, fileSourceOptions, {}, GLContextMode::Shared };
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio,
- fileSource, MapOptions().withMapMode(MapMode::Static));
+ MapOptions().withMapMode(MapMode::Static), fileSourceOptions);
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
map.jumpTo(CameraOptions().withCenter(LatLng { 37.8, -122.5 }).withZoom(10.0));