summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-02-09 16:24:24 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2022-02-11 21:54:44 +0100
commitfdf5d11ff6f3f5034d7d7f7664f4cc76deb26ef5 (patch)
tree22e1c4b93f718930b8c40c2ab68f1b2bc790f97e /tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
parent52492ff7209d2c91cbd0d549282459b58fbf3b0f (diff)
CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test
Multiple tests use qt_internal_add_resource that copies the functionality that is already implemented inside the qt_internal_add_test function. Simplify these test by replacing the qt_internal_add_resource call with the new BUILTIN_TESTDATA option. Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt44
1 files changed, 15 insertions, 29 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
index 3c870e473e..ce4d6de7cd 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/CMakeLists.txt
@@ -4,32 +4,10 @@
## tst_qgraphicsscene Test:
#####################################################################
-qt_internal_add_test(tst_qgraphicsscene
- LOWDPI # special case
- SOURCES
- tst_qgraphicsscene.cpp
- DEFINES
- QT_NO_CAST_TO_ASCII
- PUBLIC_LIBRARIES
- Qt::CorePrivate
- Qt::Gui
- Qt::GuiPrivate
- Qt::Widgets
- Qt::WidgetsPrivate
-)
-
# Resources:
-set(images_resource_files
- "Ash_European.jpg"
-)
-qt_internal_add_resource(tst_qgraphicsscene "images"
- PREFIX
- "/"
- FILES
- ${images_resource_files}
-)
set(testdata_resource_files
+ "Ash_European.jpg"
"testData/render/all-all-45-deg-left.png"
"testData/render/all-all-45-deg-right.png"
"testData/render/all-all-scale-2x.png"
@@ -60,14 +38,22 @@ set(testdata_resource_files
"testData/render/topright-topleft-untransformed.png"
)
-qt_internal_add_resource(tst_qgraphicsscene "testdata"
- PREFIX
- "/"
- FILES
- ${testdata_resource_files}
+qt_internal_add_test(tst_qgraphicsscene
+ LOWDPI # special case
+ SOURCES
+ tst_qgraphicsscene.cpp
+ DEFINES
+ QT_NO_CAST_TO_ASCII
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::WidgetsPrivate
+ TESTDATA ${testdata_resource_files}
+ BUILTIN_TESTDATA
)
-
## Scopes:
#####################################################################