diff options
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()); } |