diff options
Diffstat (limited to 'platform/darwin/test')
11 files changed, 21 insertions, 21 deletions
diff --git a/platform/darwin/test/MGLBackgroundStyleLayerTests.mm b/platform/darwin/test/MGLBackgroundStyleLayerTests.mm index afd066df82..d76cd8cd6d 100644 --- a/platform/darwin/test/MGLBackgroundStyleLayerTests.mm +++ b/platform/darwin/test/MGLBackgroundStyleLayerTests.mm @@ -22,8 +22,8 @@ - (void)testProperties { MGLBackgroundStyleLayer *layer = [[MGLBackgroundStyleLayer alloc] initWithIdentifier:@"layerID"]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::BackgroundLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::BackgroundLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Background); + auto rawLayer = static_cast<mbgl::style::BackgroundLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLCircleStyleLayerTests.mm b/platform/darwin/test/MGLCircleStyleLayerTests.mm index 853ec67968..213416109c 100644 --- a/platform/darwin/test/MGLCircleStyleLayerTests.mm +++ b/platform/darwin/test/MGLCircleStyleLayerTests.mm @@ -43,8 +43,8 @@ MGLCircleStyleLayer *layer = [[MGLCircleStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::CircleLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::CircleLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Circle); + auto rawLayer = static_cast<mbgl::style::CircleLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm b/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm index eddf82eec8..7c4e147026 100644 --- a/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm +++ b/platform/darwin/test/MGLFillExtrusionStyleLayerTests.mm @@ -43,8 +43,8 @@ MGLFillExtrusionStyleLayer *layer = [[MGLFillExtrusionStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::FillExtrusionLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::FillExtrusionLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::FillExtrusion); + auto rawLayer = static_cast<mbgl::style::FillExtrusionLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLFillStyleLayerTests.mm b/platform/darwin/test/MGLFillStyleLayerTests.mm index bae8779309..b8c39918c5 100644 --- a/platform/darwin/test/MGLFillStyleLayerTests.mm +++ b/platform/darwin/test/MGLFillStyleLayerTests.mm @@ -43,8 +43,8 @@ MGLFillStyleLayer *layer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::FillLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::FillLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Fill); + auto rawLayer = static_cast<mbgl::style::FillLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLHeatmapColorTests.mm b/platform/darwin/test/MGLHeatmapColorTests.mm index bed777ae05..19f9b4e86e 100644 --- a/platform/darwin/test/MGLHeatmapColorTests.mm +++ b/platform/darwin/test/MGLHeatmapColorTests.mm @@ -15,7 +15,7 @@ MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"sourceID" shape:feature options:nil]; MGLHeatmapStyleLayer *layer = [[MGLHeatmapStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; - auto rawLayer = layer.rawLayer->as<mbgl::style::HeatmapLayer>(); + auto rawLayer = static_cast<mbgl::style::HeatmapLayer*>(layer.rawLayer); XCTAssertTrue(rawLayer->getHeatmapColor().isUndefined(), @"heatmap-color should be unset initially."); diff --git a/platform/darwin/test/MGLHeatmapStyleLayerTests.mm b/platform/darwin/test/MGLHeatmapStyleLayerTests.mm index 76a2b0c87e..bde8a5b1c8 100644 --- a/platform/darwin/test/MGLHeatmapStyleLayerTests.mm +++ b/platform/darwin/test/MGLHeatmapStyleLayerTests.mm @@ -43,8 +43,8 @@ MGLHeatmapStyleLayer *layer = [[MGLHeatmapStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::HeatmapLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::HeatmapLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Heatmap); + auto rawLayer = static_cast<mbgl::style::HeatmapLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLHillshadeStyleLayerTests.mm b/platform/darwin/test/MGLHillshadeStyleLayerTests.mm index 2e8795759f..5c8a45beab 100644 --- a/platform/darwin/test/MGLHillshadeStyleLayerTests.mm +++ b/platform/darwin/test/MGLHillshadeStyleLayerTests.mm @@ -25,8 +25,8 @@ MGLHillshadeStyleLayer *layer = [[MGLHillshadeStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::HillshadeLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::HillshadeLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Hillshade); + auto rawLayer = static_cast<mbgl::style::HillshadeLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLLineStyleLayerTests.mm b/platform/darwin/test/MGLLineStyleLayerTests.mm index 7289debb94..c8868635ef 100644 --- a/platform/darwin/test/MGLLineStyleLayerTests.mm +++ b/platform/darwin/test/MGLLineStyleLayerTests.mm @@ -43,8 +43,8 @@ MGLLineStyleLayer *layer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::LineLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::LineLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Line); + auto rawLayer = static_cast<mbgl::style::LineLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.mm b/platform/darwin/test/MGLRasterStyleLayerTests.mm index 9325bb48f5..f0ce055b3a 100644 --- a/platform/darwin/test/MGLRasterStyleLayerTests.mm +++ b/platform/darwin/test/MGLRasterStyleLayerTests.mm @@ -25,8 +25,8 @@ MGLRasterStyleLayer *layer = [[MGLRasterStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::RasterLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::RasterLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Raster); + auto rawLayer = static_cast<mbgl::style::RasterLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLStyleLayerTests.mm.ejs b/platform/darwin/test/MGLStyleLayerTests.mm.ejs index c97813eca2..68d61072f8 100644 --- a/platform/darwin/test/MGLStyleLayerTests.mm.ejs +++ b/platform/darwin/test/MGLStyleLayerTests.mm.ejs @@ -54,8 +54,8 @@ MGL<%- camelize(type) %>StyleLayer *layer = [[MGL<%- camelize(type) %>StyleLayer alloc] initWithIdentifier:@"layerID" source:source]; <% } -%> XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::<%- camelize(type) %>Layer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::<%- camelize(type) %>Layer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::<%- camelize(type) %>); + auto rawLayer = static_cast<mbgl::style::<%- camelize(type) %>Layer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); diff --git a/platform/darwin/test/MGLSymbolStyleLayerTests.mm b/platform/darwin/test/MGLSymbolStyleLayerTests.mm index 42430940cd..daf63355e6 100644 --- a/platform/darwin/test/MGLSymbolStyleLayerTests.mm +++ b/platform/darwin/test/MGLSymbolStyleLayerTests.mm @@ -43,8 +43,8 @@ MGLSymbolStyleLayer *layer = [[MGLSymbolStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); - XCTAssertTrue(layer.rawLayer->is<mbgl::style::SymbolLayer>()); - auto rawLayer = layer.rawLayer->as<mbgl::style::SymbolLayer>(); + XCTAssertEqual(layer.rawLayer->getType(), mbgl::style::LayerType::Symbol); + auto rawLayer = static_cast<mbgl::style::SymbolLayer*>(layer.rawLayer); MGLTransition transitionTest = MGLTransitionMake(5, 4); |