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/renderer | |
parent | 3f314682fa2f2701c0d1c7e863013ce254a23afd (diff) | |
download | qtlocation-mapboxgl-56808731b699d7750726cd88dd06516c63d7f2f0.tar.gz |
Remove style::Layer::is()/as()
Diffstat (limited to 'test/renderer')
-rw-r--r-- | test/renderer/group_by_layout.test.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/renderer/group_by_layout.test.cpp b/test/renderer/group_by_layout.test.cpp index 8d0b432481..a72ec43cb9 100644 --- a/test/renderer/group_by_layout.test.cpp +++ b/test/renderer/group_by_layout.test.cpp @@ -40,18 +40,20 @@ TEST(GroupByLayout, UnrelatedType) { TEST(GroupByLayout, UnrelatedFilter) { using namespace mbgl::style::expression::dsl; std::vector<std::unique_ptr<Layer>> layers; - layers.push_back(std::make_unique<LineLayer>("a", "source")); + auto lineLayer = std::make_unique<LineLayer>("a", "source"); + lineLayer->setFilter(Filter(get("property"))); + layers.push_back(std::move(lineLayer)); layers.push_back(std::make_unique<LineLayer>("b", "source")); - layers[0]->as<LineLayer>()->setFilter(Filter(get("property"))); auto result = groupByLayout(toRenderLayers(layers)); ASSERT_EQ(2u, result.size()); } TEST(GroupByLayout, UnrelatedLayout) { std::vector<std::unique_ptr<Layer>> layers; - layers.push_back(std::make_unique<LineLayer>("a", "source")); + auto lineLayer = std::make_unique<LineLayer>("a", "source"); + lineLayer->setLineCap(LineCapType::Square); + layers.push_back(std::move(lineLayer)); layers.push_back(std::make_unique<LineLayer>("b", "source")); - layers[0]->as<LineLayer>()->setLineCap(LineCapType::Square); auto result = groupByLayout(toRenderLayers(layers)); ASSERT_EQ(2u, result.size()); } |