summaryrefslogtreecommitdiff
path: root/test/map/map.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/map/map.test.cpp')
-rw-r--r--test/map/map.test.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 4f7bd2df7b..8e2d9cb9cd 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -653,3 +653,52 @@ TEST(Map, NoContentTiles) {
0.0015,
0.1);
}
+
+// https://github.com/mapbox/mapbox-gl-native/issues/12432
+TEST(Map, Issue12432) {
+ MapTest<> test { 1, MapMode::Continuous };
+
+ test.fileSource.tileResponse = [&](const Resource&) {
+ Response result;
+ result.data = std::make_shared<std::string>(util::read_file("test/fixtures/map/issue12432/0-0-0.mvt"));
+ return result;
+ };
+
+ test.map.getStyle().loadJSON(R"STYLE({
+ "version": 8,
+ "sources": {
+ "mapbox": {
+ "type": "vector",
+ "tiles": ["http://example.com/{z}-{x}-{y}.vector.pbf"]
+ }
+ },
+ "layers": [{
+ "id": "water",
+ "type": "fill",
+ "source": "mapbox",
+ "source-layer": "water"
+ }]
+ })STYLE");
+
+ test.observer.didFinishLoadingMapCallback = [&]() {
+ test.map.getStyle().loadJSON(R"STYLE({
+ "version": 8,
+ "sources": {
+ "mapbox": {
+ "type": "vector",
+ "tiles": ["http://example.com/{z}-{x}-{y}.vector.pbf"]
+ }
+ },
+ "layers": [{
+ "id": "water",
+ "type": "line",
+ "source": "mapbox",
+ "source-layer": "water"
+ }]
+ })STYLE");
+
+ test.runLoop.stop();
+ };
+
+ test.runLoop.run();
+}