diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-19 16:57:36 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-03-20 21:30:08 +0200 |
commit | d5868d3da822f2bf3297229bd879e76853108a63 (patch) | |
tree | b3d28aab92b938cf541f917f1027d2bbd06d9780 /test/text | |
parent | d1762d7111b39d45430bd7bb75ea60b7a5d85bd2 (diff) | |
download | qtlocation-mapboxgl-d5868d3da822f2bf3297229bd879e76853108a63.tar.gz |
[core] Remove file source from public Map ctor
Diffstat (limited to 'test/text')
-rw-r--r-- | test/text/local_glyph_rasterizer.test.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/text/local_glyph_rasterizer.test.cpp b/test/text/local_glyph_rasterizer.test.cpp index d0fdb5ee57..a266021f25 100644 --- a/test/text/local_glyph_rasterizer.test.cpp +++ b/test/text/local_glyph_rasterizer.test.cpp @@ -1,6 +1,7 @@ #include <mbgl/test/util.hpp> #include <mbgl/test/stub_file_source.hpp> -#include <mbgl/map/map.hpp> +#include <mbgl/test/map_adapter.hpp> + #include <mbgl/map/map_options.hpp> #include <mbgl/util/io.hpp> #include <mbgl/util/run_loop.hpp> @@ -38,12 +39,12 @@ public: } util::RunLoop loop; - StubFileSource fileSource; + std::shared_ptr<StubFileSource> fileSource = std::make_shared<StubFileSource>(); ThreadPool threadPool { 4 }; float pixelRatio { 1 }; HeadlessFrontend frontend; - Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, - threadPool, MapOptions().withMapMode(MapMode::Static)}; + MapAdapter map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, + threadPool, MapOptions().withMapMode(MapMode::Static)}; void checkRendering(const char * name) { test::checkImage(std::string("test/fixtures/local_glyphs/") + name, @@ -59,7 +60,7 @@ public: TEST(LocalGlyphRasterizer, PingFang) { LocalGlyphRasterizerTest test(std::string("PingFang")); - test.fileSource.glyphsResponse = [&] (const Resource& resource) { + test.fileSource->glyphsResponse = [&] (const Resource& resource) { EXPECT_EQ(Resource::Kind::Glyphs, resource.kind); Response response; response.data = std::make_shared<std::string>(util::read_file("test/fixtures/resources/glyphs.pbf")); @@ -80,7 +81,7 @@ TEST(LocalGlyphRasterizer, NoLocal) { // the output should just contain basic latin characters. LocalGlyphRasterizerTest test({}); - test.fileSource.glyphsResponse = [&] (const Resource& resource) { + test.fileSource->glyphsResponse = [&] (const Resource& resource) { EXPECT_EQ(Resource::Kind::Glyphs, resource.kind); Response response; response.data = std::make_shared<std::string>(util::read_file("test/fixtures/resources/glyphs.pbf")); |