diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-11 10:26:19 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-03-13 17:14:53 +0200 |
commit | 8be135231d9efe41a3b12037518d02b36104e8cf (patch) | |
tree | efecd5380232f899aed2cd5824dc16f057f0469a /test/text/tagged_string.test.cpp | |
parent | 8a51362bccbd6487dd1ed8518443b16ba6114fd8 (diff) | |
download | qtlocation-mapboxgl-8be135231d9efe41a3b12037518d02b36104e8cf.tar.gz |
[core] Add possibility of overriding paint properties inside format expression #14062
* [core] Add format override expression and formatted section to evaluation context
* [core] Add textColor to TaggedString's formatted section
* [core] Add FormatSectionOverrides and introduce overridable properties
* [core] Populate symbol layer paint properties for text sections
* [core] Add benchmark for style that uses text-color override
* [core] Add unit test for FormatOverrideExpression
* [core] Add unit test for FormatSectionOverrides
Diffstat (limited to 'test/text/tagged_string.test.cpp')
-rw-r--r-- | test/text/tagged_string.test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/text/tagged_string.test.cpp b/test/text/tagged_string.test.cpp index 3c58ccd94b..da1141f00b 100644 --- a/test/text/tagged_string.test.cpp +++ b/test/text/tagged_string.test.cpp @@ -6,22 +6,22 @@ using namespace mbgl; TEST(TaggedString, Trim) { - TaggedString basic(u" \t\ntrim that and not this \n\t", SectionOptions(1.0f, 0)); + TaggedString basic(u" \t\ntrim that and not this \n\t", SectionOptions(1.0f, {})); basic.trim(); EXPECT_EQ(basic.rawText(), u"trim that and not this"); TaggedString twoSections; - twoSections.addSection(u" \t\ntrim that", 1.5f, 1); - twoSections.addSection(u" and not this \n\t", 0.5f, 2); + twoSections.addSection(u" \t\ntrim that", 1.5f, {}); + twoSections.addSection(u" and not this \n\t", 0.5f, {}); twoSections.trim(); EXPECT_EQ(twoSections.rawText(), u"trim that and not this"); - TaggedString empty(u"\n\t\v \r \t\n", SectionOptions(1.0f, 0)); + TaggedString empty(u"\n\t\v \r \t\n", SectionOptions(1.0f, {})); empty.trim(); EXPECT_EQ(empty.rawText(), u""); - TaggedString noTrim(u"no trim!", SectionOptions(1.0f, 0)); + TaggedString noTrim(u"no trim!", SectionOptions(1.0f, {})); noTrim.trim(); EXPECT_EQ(noTrim.rawText(), u"no trim!"); } |