aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSkye Deving <76892045+skyedeving@users.noreply.github.com>2021-01-07 04:03:51 -0600
committerSkye Deving <76892045+skyedeving@users.noreply.github.com>2021-01-28 11:05:42 -0600
commitc7f86707949b654a50bc8e6240e665d53ec2a056 (patch)
treed5846b8d48df986c45568b1dc0b51b78fa41180a /test
parent517ebdf2479647cd7c42166ec0c292d86ec3aace (diff)
Add test case for apng failed to detect from content
Diffstat (limited to 'test')
-rw-r--r--test/test_apng.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test_apng.cpp b/test/test_apng.cpp
index 180465a1..50965ad5 100644
--- a/test/test_apng.cpp
+++ b/test/test_apng.cpp
@@ -37,10 +37,17 @@ TEST_CASE("Detect png animation", "[apng][noci]") {
p.setFormat("png");
REQUIRE(!QPixmap::fromImage(p.read()).isNull());
- // Auto detect fails
+ // Auto detect fails on apng
QImageReader d;
- d.setAutoDetectImageFormat(true);
+ d.setDecideFormatFromContent(true);
d.setFileName("snackoo.png");
REQUIRE(!d.supportsAnimation());
REQUIRE(!QPixmap::fromImage(d.read()).isNull());
+
+ // Decide format fom content fails on apng
+ QImageReader c;
+ c.setDecideFormatFromContent(true);
+ c.setFileName("snackoo.png");
+ REQUIRE(!c.supportsAnimation());
+ REQUIRE(!QPixmap::fromImage(c.read()).isNull());
}