Add test for apng
This commit is contained in:
parent
b1090d6e27
commit
337b056400
@ -1,6 +1,6 @@
|
|||||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
find_package(Qt5 COMPONENTS Core Gui REQUIRED)
|
||||||
find_package(Catch2 REQUIRED)
|
find_package(Catch2 REQUIRED)
|
||||||
|
|
||||||
add_executable(test test_aopacket.cpp test_caseloading.cpp ../include/aopacket.h ../src/aopacket.cpp)
|
add_executable(test test_aopacket.cpp test_caseloading.cpp test_apng.cpp ../include/aopacket.h ../src/aopacket.cpp)
|
||||||
target_include_directories(test PRIVATE ../include)
|
target_include_directories(test PRIVATE ../include)
|
||||||
target_link_libraries(test PRIVATE Qt5::Core Catch2::Catch2)
|
target_link_libraries(test PRIVATE Qt5::Core Qt5::Gui Catch2::Catch2)
|
||||||
|
15
test/test_apng.cpp
Normal file
15
test/test_apng.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <catch2/catch.hpp>
|
||||||
|
|
||||||
|
#include <QPluginLoader>
|
||||||
|
#include <QImageReader>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
|
TEST_CASE("Support APNG Plugin (place lib same path)", "[apng]") {
|
||||||
|
QCoreApplication::addLibraryPath(".");
|
||||||
|
QPluginLoader apngPlugin("qapng");
|
||||||
|
REQUIRE(apngPlugin.load());
|
||||||
|
|
||||||
|
// Fails for some reason on windows and linux don't know about osx
|
||||||
|
// apng animation seems to be broken linux qt5-5.15.2
|
||||||
|
REQUIRE(QImageReader::supportedImageFormats().contains("APNG"));
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user