summaryrefslogtreecommitdiff
path: root/test/text
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-06 07:06:51 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-04-12 16:57:52 -0700
commit08101921633ded8978c003179c5f324c91aac266 (patch)
treecf65d7ff383548ada33791c01f95d1b5070098de /test/text
parent258ac8219a741476965581a6c6ab866ab8c57fe5 (diff)
downloadqtlocation-mapboxgl-08101921633ded8978c003179c5f324c91aac266.tar.gz
[core] Inline GlyphSet into GlyphAtlas
Diffstat (limited to 'test/text')
-rw-r--r--test/text/glyph_atlas.test.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/text/glyph_atlas.test.cpp b/test/text/glyph_atlas.test.cpp
index f38c18c28c..3ea77a16f3 100644
--- a/test/text/glyph_atlas.test.cpp
+++ b/test/text/glyph_atlas.test.cpp
@@ -2,7 +2,6 @@
#include <mbgl/test/stub_file_source.hpp>
#include <mbgl/test/stub_style_observer.hpp>
-#include <mbgl/text/glyph_set.hpp>
#include <mbgl/text/glyph_atlas.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/util/string.hpp>
@@ -73,7 +72,7 @@ TEST(GlyphAtlas, LoadingSuccess) {
return;
auto& glyphSet = test.glyphAtlas.getGlyphSet({{"Test Stack"}});
- ASSERT_FALSE(glyphSet.getSDFs().empty());
+ ASSERT_FALSE(glyphSet.empty());
test.end();
};
@@ -102,7 +101,7 @@ TEST(GlyphAtlas, LoadingFail) {
EXPECT_TRUE(error != nullptr);
EXPECT_EQ(util::toString(error), "Failed by the test case");
- ASSERT_TRUE(test.glyphAtlas.getGlyphSet({{"Test Stack"}}).getSDFs().empty());
+ ASSERT_TRUE(test.glyphAtlas.getGlyphSet({{"Test Stack"}}).empty());
ASSERT_FALSE(test.hasGlyphRanges({{"Test Stack"}}, {{0, 255}}));
test.end();
@@ -130,7 +129,7 @@ TEST(GlyphAtlas, LoadingCorrupted) {
EXPECT_TRUE(error != nullptr);
EXPECT_EQ(util::toString(error), "unknown pbf field type exception");
- ASSERT_TRUE(test.glyphAtlas.getGlyphSet({{"Test Stack"}}).getSDFs().empty());
+ ASSERT_TRUE(test.glyphAtlas.getGlyphSet({{"Test Stack"}}).empty());
ASSERT_FALSE(test.hasGlyphRanges({{"Test Stack"}}, {{0, 255}}));
test.end();
@@ -166,11 +165,11 @@ TEST(GlyphAtlas, InvalidSDFGlyph) {
GlyphAtlasTest test;
auto& glyphSet = test.glyphAtlas.getGlyphSet(fontStack);
- glyphSet.insert(SDFGlyph{ 66 /* ASCII 'B' */,
+ glyphSet.emplace(66, SDFGlyph{ 66 /* ASCII 'B' */,
AlphaImage({7, 7}), /* correct */
{ 1 /* width */, 1 /* height */, 0 /* left */, 0 /* top */,
0 /* advance */ } });
- glyphSet.insert(SDFGlyph{ 67 /* ASCII 'C' */,
+ glyphSet.emplace(67, SDFGlyph{ 67 /* ASCII 'C' */,
AlphaImage({518, 8}), /* correct */
{ 512 /* width */, 2 /* height */, 0 /* left */, 0 /* top */,
0 /* advance */ } });