From c85193a0ad05fd4040ee711d606129e510dc45fe Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 21 Jul 2017 15:24:27 -0700 Subject: [core] Replace API.ZoomHistory test with integration test --- mapbox-gl-js | 2 +- platform/node/test/ignores.json | 2 ++ test/api/repeated_render.test.cpp | 63 -------------------------------------- test/fixtures/api/z0/expected.png | Bin 5042 -> 0 bytes test/fixtures/api/z1/expected.png | Bin 5648 -> 0 bytes 5 files changed, 3 insertions(+), 64 deletions(-) delete mode 100644 test/fixtures/api/z0/expected.png delete mode 100644 test/fixtures/api/z1/expected.png diff --git a/mapbox-gl-js b/mapbox-gl-js index 0c225291ab..9d72cc2c46 160000 --- a/mapbox-gl-js +++ b/mapbox-gl-js @@ -1 +1 @@ -Subproject commit 0c225291ab77c6aa5e4b4ca41168c1e501d94be1 +Subproject commit 9d72cc2c461673525f1a6321314d2460c0f3324d diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index 1fbb93a4fa..3a3358d8c2 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -42,6 +42,8 @@ "render-tests/icon-text-fit/height": "https://github.com/mapbox/mapbox-gl-native/issues/5602", "render-tests/icon-text-fit/width-padding": "https://github.com/mapbox/mapbox-gl-native/issues/5602", "render-tests/icon-text-fit/width": "https://github.com/mapbox/mapbox-gl-native/issues/5602", + "render-tests/line-join/property-function": "https://github.com/mapbox/mapbox-gl-native/pull/9583", + "render-tests/line-join/property-function-dasharray": "https://github.com/mapbox/mapbox-gl-native/pull/9583", "render-tests/line-width/property-function": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200", "render-tests/regressions/mapbox-gl-js#2305": "https://github.com/mapbox/mapbox-gl-native/issues/6927", "render-tests/regressions/mapbox-gl-js#3010": "skip - needs issue", diff --git a/test/api/repeated_render.test.cpp b/test/api/repeated_render.test.cpp index 0e8a2715b7..be5336fe24 100644 --- a/test/api/repeated_render.test.cpp +++ b/test/api/repeated_render.test.cpp @@ -78,66 +78,3 @@ TEST(API, RepeatedRender) { auto unchecked = flo->unchecked(); EXPECT_TRUE(unchecked.empty()) << unchecked; } - -TEST(API, ZoomHistory) { - util::RunLoop loop; - - const auto style = util::read_file("test/fixtures/api/empty.json"); - - HeadlessBackend backend; - BackendScope scope { backend }; - OffscreenView view { backend.getContext(), { 512, 512 } }; - DefaultFileSource fileSource(":memory:", "."); - ThreadPool threadPool(4); - - Log::setObserver(std::make_unique()); - - float pixelRatio { 1 }; - StubRendererFrontend rendererFrontend { - std::make_unique(backend, pixelRatio, fileSource, threadPool), view }; - Map map(rendererFrontend, MapObserver::nullObserver(), view.getSize(), pixelRatio, fileSource, threadPool, MapMode::Still); - map.getStyle().loadJSON(style); - - auto geojson = mapbox::geojson::parse(R"t({ "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [ [ -150, -75 ], [ 150, 75 ] ] } } ] })t"); - auto source = std::make_unique("testSource"); - source->setGeoJSON(std::move(geojson)); - map.getStyle().addSource(std::move(source)); - - auto layer = std::make_unique("testLayer", "testSource"); - layer->setLineDasharray({ { 1.0f, 2.0f } }); - layer->setLineWidth({ 16.0f }); - map.getStyle().addLayer(std::move(layer)); - - { - PremultipliedImage result; - map.renderStill([&](std::exception_ptr) { - result = view.readStillImage(); - }); - - while (!result.valid()) { - loop.runOnce(); - } - - test::checkImage("test/fixtures/api/z0", result, 0.0002, 0.1); - } - - { - map.setZoom(1.0); - - PremultipliedImage result; - map.renderStill([&](std::exception_ptr) { - result = view.readStillImage(); - }); - - while (!result.valid()) { - loop.runOnce(); - } - - test::checkImage("test/fixtures/api/z1", result, 0.0002, 0.1); - } - - auto observer = Log::removeObserver(); - auto flo = dynamic_cast(observer.get()); - auto unchecked = flo->unchecked(); - EXPECT_TRUE(unchecked.empty()) << unchecked; -} diff --git a/test/fixtures/api/z0/expected.png b/test/fixtures/api/z0/expected.png deleted file mode 100644 index 0867a8cbf6..0000000000 Binary files a/test/fixtures/api/z0/expected.png and /dev/null differ diff --git a/test/fixtures/api/z1/expected.png b/test/fixtures/api/z1/expected.png deleted file mode 100644 index 897dc196cc..0000000000 Binary files a/test/fixtures/api/z1/expected.png and /dev/null differ -- cgit v1.2.1