diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-15 14:09:06 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-16 12:26:35 -0700 |
commit | cc1ea759a681cadcfd06fd7bdda79ca6deb38c62 (patch) | |
tree | 97ece422b0516b11979c84b8136f95aeabb1aa91 /test/style/style_image.test.cpp | |
parent | c0f6e5ccefc67dbdaa6ab7c7ea75a2a2d0c3f2ae (diff) | |
download | qtlocation-mapboxgl-cc1ea759a681cadcfd06fd7bdda79ca6deb38c62.tar.gz |
[core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
Diffstat (limited to 'test/style/style_image.test.cpp')
-rw-r--r-- | test/style/style_image.test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/style/style_image.test.cpp b/test/style/style_image.test.cpp index 34814bee88..c535397be3 100644 --- a/test/style/style_image.test.cpp +++ b/test/style/style_image.test.cpp @@ -8,7 +8,7 @@ using namespace mbgl; TEST(StyleImage, ZeroWidth) { try { - style::Image(PremultipliedImage({ 0, 16 }), 2.0); + style::Image("test", PremultipliedImage({ 0, 16 }), 2.0); FAIL() << "Expected exception"; } catch (util::SpriteImageException& ex) { EXPECT_STREQ("Sprite image dimensions may not be zero", ex.what()); @@ -17,7 +17,7 @@ TEST(StyleImage, ZeroWidth) { TEST(StyleImage, ZeroHeight) { try { - style::Image(PremultipliedImage({ 16, 0 }), 2.0); + style::Image("test", PremultipliedImage({ 16, 0 }), 2.0); FAIL() << "Expected exception"; } catch (util::SpriteImageException& ex) { EXPECT_STREQ("Sprite image dimensions may not be zero", ex.what()); @@ -26,7 +26,7 @@ TEST(StyleImage, ZeroHeight) { TEST(StyleImage, ZeroRatio) { try { - style::Image(PremultipliedImage({ 16, 16 }), 0.0); + style::Image("test", PremultipliedImage({ 16, 16 }), 0.0); FAIL() << "Expected exception"; } catch (util::SpriteImageException& ex) { EXPECT_STREQ("Sprite pixelRatio may not be <= 0", ex.what()); @@ -34,7 +34,7 @@ TEST(StyleImage, ZeroRatio) { } TEST(StyleImage, Retina) { - style::Image image(PremultipliedImage({ 32, 24 }), 2.0); + style::Image image("test", PremultipliedImage({ 32, 24 }), 2.0); EXPECT_EQ(16, image.getWidth()); EXPECT_EQ(32u, image.getImage().size.width); EXPECT_EQ(12, image.getHeight()); @@ -43,7 +43,7 @@ TEST(StyleImage, Retina) { } TEST(StyleImage, FractionalRatio) { - style::Image image(PremultipliedImage({ 20, 12 }), 1.5); + style::Image image("test", PremultipliedImage({ 20, 12 }), 1.5); EXPECT_EQ(float(20.0 / 1.5), image.getWidth()); EXPECT_EQ(20u, image.getImage().size.width); EXPECT_EQ(float(12.0 / 1.5), image.getHeight()); |