[core] Check all bucket dynamic_casts
A mismatch can occur when a layer changes from one type to another.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user