Test seems to work if linking QtApng installed on system
This commit is contained in:
parent
b3dd00270e
commit
be0fa26e85
@ -4,4 +4,4 @@ find_package(Catch2 REQUIRED)
|
|||||||
add_executable(test test_aopacket.cpp test_caseloading.cpp test_apng.cpp test_bass.cpp ../include/aopacket.h ../src/aopacket.cpp)
|
add_executable(test test_aopacket.cpp test_caseloading.cpp test_apng.cpp test_bass.cpp ../include/aopacket.h ../src/aopacket.cpp)
|
||||||
target_include_directories(test PRIVATE ../include)
|
target_include_directories(test PRIVATE ../include)
|
||||||
target_link_directories(test PRIVATE ../lib)
|
target_link_directories(test PRIVATE ../lib)
|
||||||
target_link_libraries(test PRIVATE Qt5::Core Qt5::Gui Catch2::Catch2 bass bassopus)
|
target_link_libraries(test PRIVATE Qt5::Core Qt5::Gui Catch2::Catch2 bass bassopus qapng)
|
||||||
|
@ -4,14 +4,15 @@
|
|||||||
#include <QImageReader>
|
#include <QImageReader>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
TEST_CASE("Support APNG Plugin (place lib same path)", "[apng]") {
|
TEST_CASE("Support APNG Plugin", "[apng]") {
|
||||||
|
// Check paths for libs
|
||||||
QCoreApplication::addLibraryPath(".");
|
QCoreApplication::addLibraryPath(".");
|
||||||
QPluginLoader apngPlugin("qapng");
|
QCoreApplication::addLibraryPath("lib");
|
||||||
REQUIRE(apngPlugin.load());
|
|
||||||
|
// Either it's loaded from system or we load local
|
||||||
|
QPluginLoader apngPlugin("qapng");
|
||||||
|
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
|
|
||||||
INFO(QImageReader::supportedImageFormats().join(' ').toStdString());
|
INFO(QImageReader::supportedImageFormats().join(' ').toStdString());
|
||||||
REQUIRE((QImageReader::supportedImageFormats().contains("apng") ||
|
REQUIRE(QImageReader::supportedImageFormats().contains("apng"));
|
||||||
QImageReader::supportedImageFormats().contains("APNG")));
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user