summaryrefslogtreecommitdiff
path: root/test/sprite
diff options
context:
space:
mode:
authorAdam Hunter <adam@mapbox.com>2015-11-16 16:26:02 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-12-01 09:15:05 -0800
commite1091db45ea5e921337f1cfccb36f46ab01dd54e (patch)
treef8c9f98ffeb84e1ec698961aed432a1b5ae32bee /test/sprite
parent58886842bc381cd30bac7102d4f70497c0128aa7 (diff)
downloadqtlocation-mapboxgl-e1091db45ea5e921337f1cfccb36f46ab01dd54e.tar.gz
[core] Use a separate atlas and store for annotation sprites
Fixes #1488
Diffstat (limited to 'test/sprite')
-rw-r--r--test/sprite/sprite_atlas.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/sprite/sprite_atlas.cpp b/test/sprite/sprite_atlas.cpp
index e54a88dabe..ddbd54406d 100644
--- a/test/sprite/sprite_atlas.cpp
+++ b/test/sprite/sprite_atlas.cpp
@@ -27,7 +27,7 @@ TEST(Sprite, SpriteAtlas) {
EXPECT_EQ(112, atlas.getTextureHeight());
// Image hasn't been created yet.
- EXPECT_TRUE(atlas.getData());
+ EXPECT_FALSE(atlas.getData());
auto metro = atlas.getImage("metro", false);
EXPECT_EQ(0, metro.pos.x);
@@ -42,6 +42,8 @@ TEST(Sprite, SpriteAtlas) {
EXPECT_EQ(18, metro.texture->pixelHeight);
EXPECT_EQ(1.0f, metro.texture->pixelRatio);
+ EXPECT_TRUE(atlas.getData());
+
auto pos = atlas.getPosition("metro", false);
EXPECT_DOUBLE_EQ(20, pos.size[0]);
EXPECT_DOUBLE_EQ(20, pos.size[1]);