summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-25 23:43:41 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-07-25 23:43:41 +0300
commitc36e23130c3f691516b6021fdeef29d80e977cd9 (patch)
tree766886a99fab9d97672b031760796f6884ea9d94
parent677a02a1dd1aff2317c9563371514b10e312b1f0 (diff)
downloadqtlocation-mapboxgl-upstream/mikhail_fix_assertion.tar.gz
[core] Added unit test for issue 15216upstream/mikhail_fix_assertion
-rw-r--r--test/map/map.test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index fd831a05b7..8cb781c6df 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -20,8 +20,10 @@
#include <mbgl/style/style.hpp>
#include <mbgl/style/image.hpp>
#include <mbgl/style/layers/background_layer.hpp>
+#include <mbgl/style/layers/raster_layer.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/style/sources/geojson_source.hpp>
+#include <mbgl/style/sources/image_source.hpp>
#include <mbgl/util/color.hpp>
using namespace mbgl;
@@ -867,3 +869,12 @@ TEST(Map, Issue12432) {
test.runLoop.run();
}
+
+// https://github.com/mapbox/mapbox-gl-native/issues/15216
+TEST(Map, Issue15216) {
+ MapTest<> test { 1.0f, MapMode::Continuous };
+ test.map.getStyle().addSource(std::make_unique<ImageSource>("ImageSource", std::array<LatLng, 4>()));
+ test.map.getStyle().addLayer(std::make_unique<RasterLayer>("RasterLayer", "ImageSource"));
+ // Passes, if there is no assertion hit.
+ test.runLoop.runOnce();
+} \ No newline at end of file