From d5868d3da822f2bf3297229bd879e76853108a63 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 19 Mar 2019 16:57:36 +0200 Subject: [core] Remove file source from public Map ctor --- test/text/local_glyph_rasterizer.test.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/text/local_glyph_rasterizer.test.cpp') 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 #include -#include +#include + #include #include #include @@ -38,12 +39,12 @@ public: } util::RunLoop loop; - StubFileSource fileSource; + std::shared_ptr fileSource = std::make_shared(); 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(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(util::read_file("test/fixtures/resources/glyphs.pbf")); -- cgit v1.2.1