summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-05-14 11:10:37 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-05-14 11:14:02 +0200
commitb2f450146055360e6a25e80bc91753dd4d766bb1 (patch)
tree47f054408aaeb5d4b157ccf50153ca8bfbde1df2 /tests
parent21f98a15c47c3d8d19f9e6b38f98f6324abe6b55 (diff)
downloadqtsvg-b2f450146055360e6a25e80bc91753dd4d766bb1.tar.gz
Make QSvgGenerator test pass on Android
Platforms like Android require assets to be bundled with the app. We include the reference SVGs as resources to work around this. Task-number: QTBUG-73623 Change-Id: Id9cc7a7d575da5adbe73a3392419fd74a1ec1bbd Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qsvggenerator/qsvggenerator.pro3
-rw-r--r--tests/auto/qsvggenerator/tst_qsvggenerator.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qsvggenerator/qsvggenerator.pro b/tests/auto/qsvggenerator/qsvggenerator.pro
index fd0edfa..1b6f329 100644
--- a/tests/auto/qsvggenerator/qsvggenerator.pro
+++ b/tests/auto/qsvggenerator/qsvggenerator.pro
@@ -4,4 +4,5 @@ QT += svg xml testlib widgets gui-private
SOURCES += tst_qsvggenerator.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+RESOURCES += referenceSvgs/fileName_output.svg \
+ referenceSvgs/radial_gradient.svg
diff --git a/tests/auto/qsvggenerator/tst_qsvggenerator.cpp b/tests/auto/qsvggenerator/tst_qsvggenerator.cpp
index b55b687..9217a5b 100644
--- a/tests/auto/qsvggenerator/tst_qsvggenerator.cpp
+++ b/tests/auto/qsvggenerator/tst_qsvggenerator.cpp
@@ -122,7 +122,7 @@ static void checkFile(const QString &fileName)
QFile file(fileName);
QVERIFY(file.open(QIODevice::ReadOnly));
- QFile referenceFile(SRCDIR "referenceSvgs/" + fileName);
+ QFile referenceFile(QFINDTESTDATA("referenceSvgs/" + fileName));
QVERIFY(referenceFile.open(QIODevice::ReadOnly));
compareWithoutFontInfo(file.readAll(), referenceFile.readAll());