diff options
| author | TrickyLeifa <date.epoch@gmail.com> | 2024-05-15 00:00:17 +0200 |
|---|---|---|
| committer | TrickyLeifa <date.epoch@gmail.com> | 2024-05-15 00:04:16 +0200 |
| commit | c9f52b7223685d2e7fca925594171f94dd8c6e3b (patch) | |
| tree | 740bb32a40da98a4d52836432f59a16b31333900 /test/test_apng.cpp | |
| parent | 951766666621fa77e257e6b5616fe4ab1eb2a52f (diff) | |
Ported to CMake, ...
* Ported the project to CMake
* Android and Mac support dropped for the time
being.
* Tests, BASS and Discord-RPC are now options
* Restructured and reformated the project.
* Merged `include` and `src`
* Renamed `resource` to `data`
* Renamed various files
* External libraries headers are no longer included in `src`
* Replaced header guards with #pragma once
* Multiple refactors (keywords, headers)
* Added Qt6 compatibility
* Removed various unused functions and headers
* Reworked AOPacket
* When content is passed to AOPacket, it should be ensured that the content is already decoded.
* Encoding/decoding are now static methods.
* Fixed various memory leaks
* Removed animation code for AOImage
* AOImage is always using static images
* Simplified ChatLogPiece
Diffstat (limited to 'test/test_apng.cpp')
| -rw-r--r-- | test/test_apng.cpp | 24 |
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()); |
