summaryrefslogtreecommitdiff
path: root/test/text/local_glyph_rasterizer.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/text/local_glyph_rasterizer.test.cpp')
-rw-r--r--test/text/local_glyph_rasterizer.test.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/text/local_glyph_rasterizer.test.cpp b/test/text/local_glyph_rasterizer.test.cpp
index d0fdb5ee57..26e4a2eb1d 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>
@@ -33,17 +34,16 @@ namespace {
class LocalGlyphRasterizerTest {
public:
LocalGlyphRasterizerTest(const optional<std::string> fontFamily)
- : frontend(pixelRatio, threadPool, optional<std::string>(), GLContextMode::Unique, fontFamily)
+ : frontend(1, threadPool, optional<std::string>(), GLContextMode::Unique, fontFamily)
{
}
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(), fileSource, threadPool,
+ MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
void checkRendering(const char * name) {
test::checkImage(std::string("test/fixtures/local_glyphs/") + name,
@@ -59,7 +59,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 +80,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"));