diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-07 23:24:52 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-08 18:37:41 +0200 |
commit | 2144e3f3b0b8f08b65c854225d7360847633f689 (patch) | |
tree | 16cadc63b1c3d438c5ddd4bf67aadb2e72e23130 /test/api/recycle_map.cpp | |
parent | 2f88e8257b83b77f6c06c86c99f542976e7d5199 (diff) | |
download | qtlocation-mapboxgl-upstream/map-refactor.tar.gz |
[core] Implement platform::Factory::sharedFileSource()upstream/map-refactor
Diffstat (limited to 'test/api/recycle_map.cpp')
-rw-r--r-- | test/api/recycle_map.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/api/recycle_map.cpp b/test/api/recycle_map.cpp index 5598dfbd85..fe6161d6fa 100644 --- a/test/api/recycle_map.cpp +++ b/test/api/recycle_map.cpp @@ -4,6 +4,7 @@ #include <mbgl/gl/headless_frontend.hpp> #include <mbgl/map/map.hpp> #include <mbgl/map/map_options.hpp> +#include <mbgl/platform/factory.hpp> #include <mbgl/renderer/backend_scope.hpp> #include <mbgl/storage/online_file_source.hpp> #include <mbgl/style/layers/symbol_layer.hpp> @@ -23,13 +24,13 @@ using namespace mbgl::style; TEST(API, RecycleMapUpdateImages) { util::RunLoop loop; - StubFileSource fileSource; + auto fileSource = platform::Factory::sharedFileSource({}, std::make_shared<StubFileSource>()); float pixelRatio { 1 }; - HeadlessFrontend frontend { pixelRatio, fileSource }; - auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(), - pixelRatio, fileSource, - MapOptions().withMapMode(MapMode::Static)); + FileSourceOptions stubFileSourceOptions; + HeadlessFrontend frontend { pixelRatio, stubFileSourceOptions }; + auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, + MapOptions().withMapMode(MapMode::Static), stubFileSourceOptions ); EXPECT_TRUE(map); |