summaryrefslogtreecommitdiff
path: root/test/style/style_layer.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/style/style_layer.test.cpp')
-rw-r--r--test/style/style_layer.test.cpp7
1 files changed, 5 insertions, 2 deletions
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<TextField>()));
// 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<FormatExpression>(std::vector<FormatExpressionSection>{section});
PropertyExpression<Formatted> propExprOverride(std::move(formatExprOverride));
layout.template get<TextField>() = PropertyValueType<Formatted>(std::move(propExprOverride));
@@ -351,7 +352,9 @@ void testHasOverrides(LayoutType& layout) {
// Nested expressions, overridden text-color.
auto formattedExpr1 = format("first paragraph");
- std::vector<FormatExpressionSection> sections{ { literal("second paragraph"), nullopt, nullopt, toColor(literal("blue")) } };
+ FormatExpressionSection secondParagraph(literal("second paragraph"));
+ secondParagraph.setTextSectionOptions(nullopt, nullopt, toColor(literal("blue")));
+ std::vector<FormatExpressionSection> sections{{std::move(secondParagraph)}};
auto formattedExpr2 = std::make_unique<FormatExpression>(std::move(sections));
std::unordered_map<std::string, std::shared_ptr<Expression>> branches{ { "1st", std::move(formattedExpr1) },
{ "2nd", std::move(formattedExpr2) } };