summaryrefslogtreecommitdiff
path: root/test/gl/context.test.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-07 23:24:52 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-08 18:37:41 +0200
commit2144e3f3b0b8f08b65c854225d7360847633f689 (patch)
tree16cadc63b1c3d438c5ddd4bf67aadb2e72e23130 /test/gl/context.test.cpp
parent2f88e8257b83b77f6c06c86c99f542976e7d5199 (diff)
downloadqtlocation-mapboxgl-upstream/map-refactor.tar.gz
[core] Implement platform::Factory::sharedFileSource()upstream/map-refactor
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));