summaryrefslogtreecommitdiff
path: root/test/text
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-10-02 17:03:50 -0700
committerChris Loer <chris.loer@mapbox.com>2018-10-15 13:15:46 -0700
commitce76bde13d0f4381ee861f81daf636defaff0bc5 (patch)
treee37d93d14fc64620069bac5488bae871af2fa431 /test/text
parentbc718257748f1ad87658e85f8c31b574afca57a9 (diff)
downloadqtlocation-mapboxgl-ce76bde13d0f4381ee861f81daf636defaff0bc5.tar.gz
[core] Initial implementation of 'format' expression
Diffstat (limited to 'test/text')
-rw-r--r--test/text/cross_tile_symbol_index.test.cpp4
-rw-r--r--test/text/glyph_manager.test.cpp6
-rw-r--r--test/text/quads.test.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/test/text/cross_tile_symbol_index.test.cpp b/test/text/cross_tile_symbol_index.test.cpp
index 4060d1665c..866e79729c 100644
--- a/test/text/cross_tile_symbol_index.test.cpp
+++ b/test/text/cross_tile_symbol_index.test.cpp
@@ -6,12 +6,12 @@ using namespace mbgl;
SymbolInstance makeSymbolInstance(float x, float y, std::u16string key) {
GeometryCoordinates line;
- GlyphPositionMap gpm;
+ GlyphPositions positions;
const std::pair<Shaping, Shaping> shaping(Shaping{}, Shaping{});
style::SymbolLayoutProperties::Evaluated layout_;
IndexedSubfeature subfeature(0, "", "", 0);
Anchor anchor(x, y, 0, 0);
- return {anchor, line, shaping, {}, layout_, 0, 0, 0, style::SymbolPlacementType::Point, {{0, 0}}, 0, 0, {{0, 0}}, gpm, subfeature, 0, 0, key, 0 };
+ return {anchor, line, shaping, {}, layout_, 0, 0, 0, style::SymbolPlacementType::Point, {{0, 0}}, 0, 0, {{0, 0}}, positions, subfeature, 0, 0, key, 0 };
}
diff --git a/test/text/glyph_manager.test.cpp b/test/text/glyph_manager.test.cpp
index a96e1b970c..3d7a220dc5 100644
--- a/test/text/glyph_manager.test.cpp
+++ b/test/text/glyph_manager.test.cpp
@@ -107,7 +107,7 @@ TEST(GlyphManager, LoadingSuccess) {
};
test.requestor.glyphsAvailable = [&] (GlyphMap glyphs) {
- const auto& testPositions = glyphs.at({{"Test Stack"}});
+ const auto& testPositions = glyphs.at(FontStackHasher()({{"Test Stack"}}));
ASSERT_EQ(testPositions.size(), 3u);
ASSERT_EQ(testPositions.count(u'a'), 1u);
@@ -224,7 +224,7 @@ TEST(GlyphManager, LoadLocalCJKGlyph) {
test.requestor.glyphsAvailable = [&] (GlyphMap glyphs) {
EXPECT_EQ(glyphResponses, 0); // Local generation should prevent requesting any glyphs
- const auto& testPositions = glyphs.at({{"Test Stack"}});
+ const auto& testPositions = glyphs.at(FontStackHasher()({{"Test Stack"}}));
ASSERT_EQ(testPositions.size(), 1u);
ASSERT_EQ(testPositions.count(u'中'), 1u);
@@ -275,7 +275,7 @@ TEST(GlyphManager, LoadingInvalid) {
};
test.requestor.glyphsAvailable = [&] (GlyphMap glyphs) {
- const auto& testPositions = glyphs.at({{"Test Stack"}});
+ const auto& testPositions = glyphs.at(FontStackHasher()({{"Test Stack"}}));
ASSERT_EQ(testPositions.size(), 2u);
ASSERT_FALSE(bool(testPositions.at(u'A')));
diff --git a/test/text/quads.test.cpp b/test/text/quads.test.cpp
index 8eedd9bd2e..c032d58b88 100644
--- a/test/text/quads.test.cpp
+++ b/test/text/quads.test.cpp
@@ -50,7 +50,7 @@ TEST(getIconQuads, style) {
shapedText.bottom = 30.0f;
shapedText.left = -60.0f;
shapedText.right = 20.0f;
- shapedText.positionedGlyphs.emplace_back(PositionedGlyph(32, 0.0f, 0.0f, false));
+ shapedText.positionedGlyphs.emplace_back(PositionedGlyph(32, 0.0f, 0.0f, false, 0, 1.0));
// none
{