aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkye Deving <76892045+skyedeving@users.noreply.github.com>2021-01-06 00:43:30 -0600
committerSkye Deving <76892045+skyedeving@users.noreply.github.com>2021-01-28 11:05:42 -0600
commitbe0fa26e85de1edaa5c7e0e68d62d9f59f854753 (patch)
tree02f47c01667e5958cc724750890f64c88e45bce1
parentb3dd00270e6d644864ced766a0f1ec2bb3a89a78 (diff)
Test seems to work if linking QtApng installed on system
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--test/test_apng.cpp13
2 files changed, 8 insertions, 7 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 840eabc1..e09e48e3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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)
target_include_directories(test PRIVATE ../include)
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)
diff --git a/test/test_apng.cpp b/test/test_apng.cpp
index 026826b1..7d7062bc 100644
--- a/test/test_apng.cpp
+++ b/test/test_apng.cpp
@@ -4,14 +4,15 @@
#include <QImageReader>
#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("lib");
+
+ // Either it's loaded from system or we load local
QPluginLoader apngPlugin("qapng");
- REQUIRE(apngPlugin.load());
+ 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());
- REQUIRE((QImageReader::supportedImageFormats().contains("apng") ||
- QImageReader::supportedImageFormats().contains("APNG")));
+ REQUIRE(QImageReader::supportedImageFormats().contains("apng"));
}