summaryrefslogtreecommitdiff
path: root/test/util/image.test.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-26 15:22:31 -0700
committerKonstantin Käfer <mail@kkaefer.com>2016-10-27 18:30:58 -0700
commit62b56b799a7d4fcd1a8f151eed878054b862da5b (patch)
tree34d510a69f9dd1bca30e9b137feffbd1eb6495d0 /test/util/image.test.cpp
parentef8017198ce8f0bd79ba5a5ed31e35a16e3433bb (diff)
downloadqtlocation-mapboxgl-62b56b799a7d4fcd1a8f151eed878054b862da5b.tar.gz
[core] change std::array<uint16_t, 2> to mbgl::Size
Diffstat (limited to 'test/util/image.test.cpp')
-rw-r--r--test/util/image.test.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/util/image.test.cpp b/test/util/image.test.cpp
index b2814e66da..b15ddc1b3f 100644
--- a/test/util/image.test.cpp
+++ b/test/util/image.test.cpp
@@ -7,7 +7,7 @@
using namespace mbgl;
TEST(Image, PNGRoundTrip) {
- PremultipliedImage rgba { 1, 1 };
+ PremultipliedImage rgba({ 1, 1 });
rgba.data[0] = 128;
rgba.data[1] = 0;
rgba.data[2] = 0;
@@ -21,7 +21,7 @@ TEST(Image, PNGRoundTrip) {
}
TEST(Image, PNGRoundTripAlpha) {
- PremultipliedImage rgba { 1, 1 };
+ PremultipliedImage rgba({ 1, 1 });
rgba.data[0] = 128;
rgba.data[1] = 0;
rgba.data[2] = 0;
@@ -68,26 +68,26 @@ TEST(Image, PNGReadProfileAlpha) {
TEST(Image, PNGTile) {
PremultipliedImage image = decodeImage(util::read_file("test/fixtures/image/tile.png"));
- EXPECT_EQ(256u, image.width);
- EXPECT_EQ(256u, image.height);
+ EXPECT_EQ(256u, image.size.width);
+ EXPECT_EQ(256u, image.size.height);
}
TEST(Image, JPEGTile) {
PremultipliedImage image = decodeImage(util::read_file("test/fixtures/image/tile.jpeg"));
- EXPECT_EQ(256u, image.width);
- EXPECT_EQ(256u, image.height);
+ EXPECT_EQ(256u, image.size.width);
+ EXPECT_EQ(256u, image.size.height);
}
#if !defined(__ANDROID__) && !defined(__APPLE__) && !defined(QT_IMAGE_DECODERS)
TEST(Image, WebPTile) {
PremultipliedImage image = decodeImage(util::read_file("test/fixtures/image/tile.webp"));
- EXPECT_EQ(256u, image.width);
- EXPECT_EQ(256u, image.height);
+ EXPECT_EQ(256u, image.size.width);
+ EXPECT_EQ(256u, image.size.height);
}
#endif // !defined(__ANDROID__) && !defined(__APPLE__) && !defined(QT_IMAGE_DECODERS)
TEST(Image, Premultiply) {
- UnassociatedImage rgba { 1, 1 };
+ UnassociatedImage rgba({ 1, 1 });
rgba.data[0] = 255;
rgba.data[1] = 254;
rgba.data[2] = 253;