summaryrefslogtreecommitdiff
path: root/test/sprite
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-17 08:58:36 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-17 09:36:43 -0700
commit63558e06ad4fbc33ad3bdec57dc0ead2b369a7b0 (patch)
tree1a8e625557908259fd4a8fff1629d26d6e74b854 /test/sprite
parent4c26759b69bf1c5ef12b244562784f97d773315f (diff)
downloadqtlocation-mapboxgl-63558e06ad4fbc33ad3bdec57dc0ead2b369a7b0.tar.gz
[core] Remove obsolete modular arithmetic on atlas coordinates
We switched to 16-bit coordinates in attributes in b0cb8715ed74678b4d0f05829fa71a590e41b2f6, so there's no longer any reason to require that they are divisible by four.
Diffstat (limited to 'test/sprite')
-rw-r--r--test/sprite/sprite_atlas.test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sprite/sprite_atlas.test.cpp b/test/sprite/sprite_atlas.test.cpp
index 37a50ddddb..269e5b4b62 100644
--- a/test/sprite/sprite_atlas.test.cpp
+++ b/test/sprite/sprite_atlas.test.cpp
@@ -91,8 +91,8 @@ TEST(SpriteAtlas, Size) {
float imagePixelRatio = metro.relativePixelRatio * atlas.getPixelRatio();
EXPECT_EQ(0, metro.pos.x);
EXPECT_EQ(0, metro.pos.y);
- EXPECT_EQ(16, metro.pos.w);
- EXPECT_EQ(16, metro.pos.h);
+ EXPECT_EQ(15, metro.pos.w);
+ EXPECT_EQ(15, metro.pos.h);
EXPECT_EQ(18, metro.width);
EXPECT_EQ(18, metro.height);
EXPECT_EQ(18u, metro.width * imagePixelRatio);
@@ -118,8 +118,8 @@ TEST(SpriteAtlas, Updates) {
float imagePixelRatio = one.relativePixelRatio * atlas.getPixelRatio();
EXPECT_EQ(0, one.pos.x);
EXPECT_EQ(0, one.pos.y);
- EXPECT_EQ(20, one.pos.w);
- EXPECT_EQ(16, one.pos.h);
+ EXPECT_EQ(18, one.pos.w);
+ EXPECT_EQ(14, one.pos.h);
EXPECT_EQ(16, one.width);
EXPECT_EQ(12, one.height);
EXPECT_EQ(16u, one.width * imagePixelRatio);