Add test resources in and enable tests

This commit is contained in:
Skye Deving 2021-01-07 04:29:49 -06:00
parent 760d586160
commit cbdeea0010
4 changed files with 5 additions and 3 deletions

View File

@ -75,4 +75,6 @@ jobs:
working-directory: ${{github.workspace}}/build/test working-directory: ${{github.workspace}}/build/test
shell: bash shell: bash
# Skipping tests for bass since no audio device # Skipping tests for bass since no audio device
run: QT_QPA_PLATFORM=offscreen ./test ~[bass] ~[noci] run: |
ln -s ../../test/*.png .
QT_QPA_PLATFORM=offscreen ./test ~[bass] ~[noci]

BIN
test/missle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
test/snackoo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -19,7 +19,7 @@ TEST_CASE("Support APNG Plugin", "[apng]") {
REQUIRE(QImageReader::supportedImageFormats().contains("apng")); REQUIRE(QImageReader::supportedImageFormats().contains("apng"));
} }
TEST_CASE("Detect png animation", "[apng][noci]") { TEST_CASE("Detect png animation", "[apng]") {
// Required for QPixmap methods // Required for QPixmap methods
int argc = 1; int argc = 1;
char bin[] = "test"; char bin[] = "test";
@ -51,7 +51,7 @@ TEST_CASE("Detect png animation", "[apng][noci]") {
} }
SECTION("Detect png frame has no animation") { SECTION("Detect png frame has no animation") {
reader.setFileName("snackoo-frame.png"); reader.setFileName("missle.png");
reader.setFormat("apng"); reader.setFormat("apng");
REQUIRE(!reader.supportsAnimation()); REQUIRE(!reader.supportsAnimation());
reader.setFormat("png"); reader.setFormat("png");