diff options
Diffstat (limited to 'test/api/recycle_map.cpp')
-rw-r--r-- | test/api/recycle_map.cpp | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/test/api/recycle_map.cpp b/test/api/recycle_map.cpp index 8cd622fe79..61d4265914 100644 --- a/test/api/recycle_map.cpp +++ b/test/api/recycle_map.cpp @@ -19,40 +19,41 @@ using namespace mbgl; using namespace mbgl::style; - -TEST(API, RecycleMapUpdateImages) { - util::RunLoop loop; - - StubFileSource fileSource; - ThreadPool threadPool(4); - float pixelRatio { 1 }; - - HeadlessFrontend frontend { pixelRatio, fileSource, threadPool }; - auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(), - pixelRatio, fileSource, threadPool, MapMode::Still); - - EXPECT_TRUE(map); - - auto loadStyle = [&](auto markerName, auto markerPath) { - auto source = std::make_unique<GeoJSONSource>("geometry"); - source->setGeoJSON({ Point<double> { 0, 0 } }); - - auto layer = std::make_unique<SymbolLayer>("geometry", "geometry"); - layer->setIconImage({ markerName }); - - map->getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json")); - map->getStyle().addSource(std::move(source)); - map->getStyle().addLayer(std::move(layer)); - map->getStyle().addImage(std::make_unique<style::Image>(markerName, decodeImage(util::read_file(markerPath)), 1.0)); - }; - - // default marker - - loadStyle("default_marker", "test/fixtures/sprites/default_marker.png"); - test::checkImage("test/fixtures/recycle_map/default_marker", frontend.render(*map), 0.0006, 0.1); - - // flipped marker - - loadStyle("flipped_marker", "test/fixtures/sprites/flipped_marker.png"); - test::checkImage("test/fixtures/recycle_map/flipped_marker", frontend.render(*map), 0.0006, 0.1); -} +// Wanted to use DISABLED_TEST here but clang-tidy can't cope with it. + +//TEST(API, RecycleMapUpdateImages) { +// util::RunLoop loop; +// +// StubFileSource fileSource; +// ThreadPool threadPool(4); +// float pixelRatio { 1 }; +// +// HeadlessFrontend frontend { pixelRatio, fileSource, threadPool }; +// auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(), +// pixelRatio, fileSource, threadPool, MapMode::Still); +// +// EXPECT_TRUE(map); +// +// auto loadStyle = [&](auto markerName, auto markerPath) { +// auto source = std::make_unique<GeoJSONSource>("geometry"); +// source->setGeoJSON({ Point<double> { 0, 0 } }); +// +// auto layer = std::make_unique<SymbolLayer>("geometry", "geometry"); +// layer->setIconImage({ markerName }); +// +// map->getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json")); +// map->getStyle().addSource(std::move(source)); +// map->getStyle().addLayer(std::move(layer)); +// map->getStyle().addImage(std::make_unique<style::Image>(markerName, decodeImage(util::read_file(markerPath)), 1.0)); +// }; +// +// // default marker +// +// loadStyle("default_marker", "test/fixtures/sprites/default_marker.png"); +// test::checkImage("test/fixtures/recycle_map/default_marker", frontend.render(*map), 0.0006, 0.1); +// +// // flipped marker +// +// loadStyle("flipped_marker", "test/fixtures/sprites/flipped_marker.png"); +// test::checkImage("test/fixtures/recycle_map/flipped_marker", frontend.render(*map), 0.0006, 0.1); +//} |