summaryrefslogtreecommitdiff
path: root/test/api/annotations.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/api/annotations.test.cpp
parent2f88e8257b83b77f6c06c86c99f542976e7d5199 (diff)
downloadqtlocation-mapboxgl-upstream/map-refactor.tar.gz
[core] Implement platform::Factory::sharedFileSource()upstream/map-refactor
Diffstat (limited to 'test/api/annotations.test.cpp')
-rw-r--r--test/api/annotations.test.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index a67e691f69..a4ba981a13 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -6,6 +6,7 @@
#include <mbgl/style/image.hpp>
#include <mbgl/map/map.hpp>
#include <mbgl/map/map_options.hpp>
+#include <mbgl/platform/factory.hpp>
#include <mbgl/util/io.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/util/color.hpp>
@@ -27,12 +28,15 @@ std::unique_ptr<style::Image> namedMarker(const std::string& name) {
class AnnotationTest {
public:
util::RunLoop loop;
- StubFileSource fileSource;
+ FileSourceOptions stubFileSourceOptions;
+ std::shared_ptr<FileSource> fileSource = platform::Factory::sharedFileSource(
+ stubFileSourceOptions, std::make_shared<StubFileSource>());
float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, fileSource };
- Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource,
- MapOptions().withMapMode(MapMode::Static)};
+ HeadlessFrontend frontend { pixelRatio, stubFileSourceOptions };
+
+ Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio,
+ MapOptions().withMapMode(MapMode::Static), stubFileSourceOptions };
void checkRendering(const char * name) {
test::checkImage(std::string("test/fixtures/annotations/") + name,