From a01ecc92a079cb488d5f24d374d82e5fc34fe14b Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Tue, 12 Nov 2019 22:21:12 +0200 Subject: [core] Add image sections to format expression --- test/style/style_layer.test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/style/style_layer.test.cpp') diff --git a/test/style/style_layer.test.cpp b/test/style/style_layer.test.cpp index 2d6ef5881a..1d60197c2d 100644 --- a/test/style/style_layer.test.cpp +++ b/test/style/style_layer.test.cpp @@ -343,7 +343,8 @@ void testHasOverrides(LayoutType& layout) { EXPECT_FALSE(MockOverrides::hasOverrides(layout.template get())); // Expression, overridden text-color. - FormatExpressionSection section(literal(""), nullopt, nullopt, toColor(literal("red"))); + FormatExpressionSection section(literal("")); + section.setTextSectionOptions(nullopt, nullopt, toColor(literal("red"))); auto formatExprOverride = std::make_unique(std::vector{section}); PropertyExpression propExprOverride(std::move(formatExprOverride)); layout.template get() = PropertyValueType(std::move(propExprOverride)); @@ -351,7 +352,9 @@ void testHasOverrides(LayoutType& layout) { // Nested expressions, overridden text-color. auto formattedExpr1 = format("first paragraph"); - std::vector sections{ { literal("second paragraph"), nullopt, nullopt, toColor(literal("blue")) } }; + FormatExpressionSection secondParagraph(literal("second paragraph")); + secondParagraph.setTextSectionOptions(nullopt, nullopt, toColor(literal("blue"))); + std::vector sections{{std::move(secondParagraph)}}; auto formattedExpr2 = std::make_unique(std::move(sections)); std::unordered_map> branches{ { "1st", std::move(formattedExpr1) }, { "2nd", std::move(formattedExpr2) } }; -- cgit v1.2.1