aboutsummaryrefslogtreecommitdiff
path: root/test/test_apng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_apng.cpp')
-rw-r--r--test/test_apng.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/test/test_apng.cpp b/test/test_apng.cpp
index 20c7e927..c092191f 100644
--- a/test/test_apng.cpp
+++ b/test/test_apng.cpp
@@ -1,12 +1,13 @@
#include <catch2/catch.hpp>
-#include <QPluginLoader>
-#include <QImageReader>
#include <QCoreApplication>
#include <QGuiApplication>
+#include <QImageReader>
#include <QPixmap>
+#include <QPluginLoader>
-TEST_CASE("Support APNG Plugin", "[apng]") {
+TEST_CASE("Support APNG Plugin", "[apng]")
+{
// Check paths for libs
QCoreApplication::addLibraryPath(".");
QCoreApplication::addLibraryPath("lib");
@@ -19,38 +20,43 @@ TEST_CASE("Support APNG Plugin", "[apng]") {
REQUIRE(QImageReader::supportedImageFormats().contains("apng"));
}
-TEST_CASE("Detect png animation", "[apng]") {
+TEST_CASE("Detect png animation", "[apng]")
+{
// Required for QPixmap methods
int argc = 1;
char bin[] = "test";
- char *argv[] = { bin };
+ char *argv[] = {bin};
QGuiApplication app(argc, argv);
// Instantiate reader
QImageReader reader;
- SECTION("Decide format from content fails on apng") {
+ SECTION("Decide format from content fails on apng")
+ {
reader.setFileName("snackoo.png");
reader.setDecideFormatFromContent(true);
REQUIRE(!reader.supportsAnimation());
REQUIRE(!QPixmap::fromImage(reader.read()).isNull());
}
- SECTION("Auto detect fails on apng") {
+ SECTION("Auto detect fails on apng")
+ {
reader.setFileName("snackoo.png");
reader.setAutoDetectImageFormat(true);
REQUIRE(!reader.supportsAnimation());
REQUIRE(!QPixmap::fromImage(reader.read()).isNull());
}
- SECTION("Detect apng supports animation") {
+ SECTION("Detect apng supports animation")
+ {
reader.setFileName("snackoo.png");
reader.setFormat("apng");
REQUIRE(reader.supportsAnimation());
REQUIRE(!QPixmap::fromImage(reader.read()).isNull());
}
- SECTION("Detect png frame has no animation") {
+ SECTION("Detect png frame has no animation")
+ {
reader.setFileName("missle.png");
reader.setFormat("apng");
REQUIRE(!reader.supportsAnimation());