diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-10-29 14:29:16 +0200 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2018-10-31 11:22:46 +0200 |
commit | 56808731b699d7750726cd88dd06516c63d7f2f0 (patch) | |
tree | 7839dffdd0eec33f6ebd2cfa9195f7408ac6c289 /test/style | |
parent | 3f314682fa2f2701c0d1c7e863013ce254a23afd (diff) | |
download | qtlocation-mapboxgl-56808731b699d7750726cd88dd06516c63d7f2f0.tar.gz |
Remove style::Layer::is()/as()
Diffstat (limited to 'test/style')
-rw-r--r-- | test/style/conversion/layer.test.cpp | 6 | ||||
-rw-r--r-- | test/style/style_layer.test.cpp | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/style/conversion/layer.test.cpp b/test/style/conversion/layer.test.cpp index 33cd329999..18754a09fb 100644 --- a/test/style/conversion/layer.test.cpp +++ b/test/style/conversion/layer.test.cpp @@ -25,9 +25,9 @@ TEST(StyleConversion, LayerTransition) { } } })JSON"); - - ASSERT_EQ(400ms, *layer->as<BackgroundLayer>()->impl().paint + ASSERT_EQ(LayerType::Background, layer->getType()); + ASSERT_EQ(400ms, *static_cast<BackgroundLayer*>(layer.get())->impl().paint .get<BackgroundColor>().options.duration); - ASSERT_EQ(500ms, *layer->as<BackgroundLayer>()->impl().paint + ASSERT_EQ(500ms, *static_cast<BackgroundLayer*>(layer.get())->impl().paint .get<BackgroundColor>().options.delay); } diff --git a/test/style/style_layer.test.cpp b/test/style/style_layer.test.cpp index 61516a2de9..5ea16b7422 100644 --- a/test/style/style_layer.test.cpp +++ b/test/style/style_layer.test.cpp @@ -54,7 +54,7 @@ const auto duration = 1.0f; TEST(Layer, BackgroundProperties) { auto layer = std::make_unique<BackgroundLayer>("background"); - EXPECT_TRUE(layer->is<BackgroundLayer>()); + ASSERT_EQ(LayerType::Background, layer->getType()); // Paint properties @@ -70,7 +70,7 @@ TEST(Layer, BackgroundProperties) { TEST(Layer, CircleProperties) { auto layer = std::make_unique<CircleLayer>("circle", "source"); - EXPECT_TRUE(layer->is<CircleLayer>()); + ASSERT_EQ(LayerType::Circle, layer->getType()); // Paint properties @@ -95,7 +95,7 @@ TEST(Layer, CircleProperties) { TEST(Layer, FillProperties) { auto layer = std::make_unique<FillLayer>("fill", "source"); - EXPECT_TRUE(layer->is<FillLayer>()); + ASSERT_EQ(LayerType::Fill, layer->getType()); // Paint properties @@ -123,7 +123,7 @@ TEST(Layer, FillProperties) { TEST(Layer, LineProperties) { auto layer = std::make_unique<LineLayer>("line", "source"); - EXPECT_TRUE(layer->is<LineLayer>()); + ASSERT_EQ(LayerType::Line, layer->getType()); // Layout properties @@ -174,7 +174,7 @@ TEST(Layer, LineProperties) { TEST(Layer, RasterProperties) { auto layer = std::make_unique<RasterLayer>("raster", "source"); - EXPECT_TRUE(layer->is<RasterLayer>()); + ASSERT_EQ(LayerType::Raster, layer->getType()); // Paint properties |