diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-09-11 13:05:30 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-09-13 13:27:44 +0200 |
commit | 071129bf61dda7d23c6f305b0c42139bf20560cb (patch) | |
tree | 9315fb5421cf5a98a7a1a227a64f39e21e9e9e8e /test | |
parent | 6367fcb2a82c52c7f80e82941621be603373a57b (diff) | |
download | qtlocation-mapboxgl-071129bf61dda7d23c6f305b0c42139bf20560cb.tar.gz |
[linux,qt] Remove remainder of WebP support
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/image/tile.webp | bin | 8916 -> 0 bytes | |||
-rw-r--r-- | test/util/image.test.cpp | 8 | ||||
-rw-r--r-- | test/util/mapbox.test.cpp | 24 |
3 files changed, 2 insertions, 30 deletions
diff --git a/test/fixtures/image/tile.webp b/test/fixtures/image/tile.webp Binary files differdeleted file mode 100644 index 5dbad8f88d..0000000000 --- a/test/fixtures/image/tile.webp +++ /dev/null diff --git a/test/util/image.test.cpp b/test/util/image.test.cpp index f4a6473040..c2922415cb 100644 --- a/test/util/image.test.cpp +++ b/test/util/image.test.cpp @@ -78,14 +78,6 @@ TEST(Image, JPEGTile) { 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.size.width); - EXPECT_EQ(256u, image.size.height); -} -#endif // !defined(__ANDROID__) && !defined(__APPLE__) && !defined(QT_IMAGE_DECODERS) - TEST(Image, Resize) { AlphaImage image({0, 0}); diff --git a/test/util/mapbox.test.cpp b/test/util/mapbox.test.cpp index 301475dae4..33bd6e72ee 100644 --- a/test/util/mapbox.test.cpp +++ b/test/util/mapbox.test.cpp @@ -116,8 +116,8 @@ TEST(Mapbox, TileURL) { "https://api.example.com/v4/a.b/0/0/0.png?access_token=key", mbgl::util::mapbox::normalizeTileURL("https://api.example.com", "mapbox://tiles/a.b/0/0/0.png", "key")); EXPECT_EQ( - "https://api.mapbox.com/v4/a.b/0/0/0@2x.webp?access_token=key", - mbgl::util::mapbox::normalizeTileURL(util::API_BASE_URL, "mapbox://tiles/a.b/0/0/0@2x.webp", "key")); + "https://api.mapbox.com/v4/a.b/0/0/0@2x.png?access_token=key", + mbgl::util::mapbox::normalizeTileURL(util::API_BASE_URL, "mapbox://tiles/a.b/0/0/0@2x.png", "key")); EXPECT_EQ( "https://api.mapbox.com/v4/a.b,c.d/0/0/0.pbf?access_token=key", mbgl::util::mapbox::normalizeTileURL(util::API_BASE_URL, "mapbox://tiles/a.b,c.d/0/0/0.pbf", "key")); @@ -166,8 +166,6 @@ TEST(Mapbox, CanonicalURL) { EXPECT_EQ( "mapbox://tiles/a.b/{z}/{x}/{y}@2x.jpg70", mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.jpg70?access_token=key", SourceType::Raster, 512)); - -#if defined(__ANDROID__) || defined(__APPLE__) EXPECT_EQ( "mapbox://tiles/a.b/{z}/{x}/{y}{ratio}.png", mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.png", SourceType::Raster, 256)); @@ -180,20 +178,6 @@ TEST(Mapbox, CanonicalURL) { EXPECT_EQ( "mapbox://tiles/a.b/{z}/{x}/{y}@2x.png", mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.png?access_token=key", SourceType::Raster, 512)); -#else - EXPECT_EQ( - "mapbox://tiles/a.b/{z}/{x}/{y}{ratio}.webp", - mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.png", SourceType::Raster, 256)); - EXPECT_EQ( - "mapbox://tiles/a.b/{z}/{x}/{y}{ratio}.webp", - mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.png?access_token=key", SourceType::Raster, 256)); - EXPECT_EQ( - "mapbox://tiles/a.b/{z}/{x}/{y}@2x.webp", - mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.png", SourceType::Raster, 512)); - EXPECT_EQ( - "mapbox://tiles/a.b/{z}/{x}/{y}@2x.webp", - mbgl::util::mapbox::canonicalizeTileURL("http://api.mapbox.com/v4/a.b/{z}/{x}/{y}.png?access_token=key", SourceType::Raster, 512)); -#endif // defined(__ANDROID__) || defined(__APPLE__) // We don't ever expect to see these inputs, but be safe anyway. EXPECT_EQ( @@ -221,11 +205,7 @@ TEST(Mapbox, CanonicalizeRasterTileset) { mbgl::util::mapbox::canonicalizeTileset(tileset, "mapbox://mapbox.satellite", SourceType::Raster, 256); -#if !defined(__ANDROID__) && !defined(__APPLE__) - EXPECT_EQ("mapbox://tiles/mapbox.satellite/{z}/{x}/{y}{ratio}.webp", tileset.tiles[0]); -#else EXPECT_EQ("mapbox://tiles/mapbox.satellite/{z}/{x}/{y}{ratio}.png", tileset.tiles[0]); -#endif } TEST(Mapbox, CanonicalizeVectorTileset) { |