From 86507e7c45c77c50023ca6e77919b4bd21c33079 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sat, 21 Dec 2024 14:22:24 +0100 Subject: [PATCH] Move tests expected images to res directory. --- tests/ProgressBarCounterTest.cpp | 6 +++--- tests/ProgressBarInfiniteTest.cpp | 4 ++-- tests/{ => res}/counterFinished.png | Bin tests/{ => res}/counterInitial.png | Bin tests/{ => res}/counterUpdated.png | Bin tests/{ => res}/infinityInitial.png | Bin tests/{ => res}/infinityUpdated.png | Bin tests/testResources.qrc | 10 +++++----- 8 files changed, 10 insertions(+), 10 deletions(-) rename tests/{ => res}/counterFinished.png (100%) rename tests/{ => res}/counterInitial.png (100%) rename tests/{ => res}/counterUpdated.png (100%) rename tests/{ => res}/infinityInitial.png (100%) rename tests/{ => res}/infinityUpdated.png (100%) diff --git a/tests/ProgressBarCounterTest.cpp b/tests/ProgressBarCounterTest.cpp index db4ef26..469387b 100644 --- a/tests/ProgressBarCounterTest.cpp +++ b/tests/ProgressBarCounterTest.cpp @@ -42,7 +42,7 @@ void ProgressBarCounterTest::checkInitialPaint() { ProgressBarCounter progressBar(QLatin1String("Initial"), max_); auto actual{progressBar.grab().toImage()}; - QImage expected(":/counterInitial.png"); + QImage expected(":/res/counterInitial.png"); expected = expected.convertToFormat(actual.format()); QCOMPARE(actual, expected); } @@ -52,7 +52,7 @@ void ProgressBarCounterTest::checkPaintAfterUpdate() ProgressBarCounter progressBar(QLatin1String("Updated"), max_); progressBar.updateProgress(10); auto actual{progressBar.grab().toImage()}; - QImage expected(":/counterUpdated.png"); + QImage expected(":/res/counterUpdated.png"); expected = expected.convertToFormat(actual.format()); QCOMPARE(actual, expected); } @@ -62,7 +62,7 @@ void ProgressBarCounterTest::checkPaintFinished() ProgressBarCounter progressBar(QLatin1String("Finished"), max_); progressBar.updateProgress(100); auto actual{progressBar.grab().toImage()}; - QImage expected(":/counterFinished.png"); + QImage expected(":/res/counterFinished.png"); expected = expected.convertToFormat(actual.format()); QCOMPARE(actual, expected); } diff --git a/tests/ProgressBarInfiniteTest.cpp b/tests/ProgressBarInfiniteTest.cpp index 12cd05c..5e4cf27 100644 --- a/tests/ProgressBarInfiniteTest.cpp +++ b/tests/ProgressBarInfiniteTest.cpp @@ -27,7 +27,7 @@ void ProgressBarInfiniteTest::checkInitialPaint() { ProgressBarInfinite progressBar(QLatin1String("Initial")); auto actual{progressBar.grab().toImage()}; - QImage expected(":/infinityInitial.png"); + QImage expected(":/res/infinityInitial.png"); expected = expected.convertToFormat(actual.format()); QCOMPARE(actual, expected); } @@ -40,7 +40,7 @@ void ProgressBarInfiniteTest::checkPaintAfterUpdate() QApplication::sendEvent(&progressBar, &event); auto actual{progressBar.grab().toImage()}; - QImage expected(":/infinityUpdated.png"); + QImage expected(":/res/infinityUpdated.png"); expected = expected.convertToFormat(actual.format()); QCOMPARE(actual, expected); } diff --git a/tests/counterFinished.png b/tests/res/counterFinished.png similarity index 100% rename from tests/counterFinished.png rename to tests/res/counterFinished.png diff --git a/tests/counterInitial.png b/tests/res/counterInitial.png similarity index 100% rename from tests/counterInitial.png rename to tests/res/counterInitial.png diff --git a/tests/counterUpdated.png b/tests/res/counterUpdated.png similarity index 100% rename from tests/counterUpdated.png rename to tests/res/counterUpdated.png diff --git a/tests/infinityInitial.png b/tests/res/infinityInitial.png similarity index 100% rename from tests/infinityInitial.png rename to tests/res/infinityInitial.png diff --git a/tests/infinityUpdated.png b/tests/res/infinityUpdated.png similarity index 100% rename from tests/infinityUpdated.png rename to tests/res/infinityUpdated.png diff --git a/tests/testResources.qrc b/tests/testResources.qrc index 3fc04d1..046c8e5 100644 --- a/tests/testResources.qrc +++ b/tests/testResources.qrc @@ -1,9 +1,9 @@ - infinityInitial.png - infinityUpdated.png - counterInitial.png - counterUpdated.png - counterFinished.png + res/infinityInitial.png + res/infinityUpdated.png + res/counterInitial.png + res/counterUpdated.png + res/counterFinished.png