From b2f450146055360e6a25e80bc91753dd4d766bb1 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 14 May 2019 11:10:37 +0200 Subject: 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 --- tests/auto/qsvggenerator/qsvggenerator.pro | 3 ++- tests/auto/qsvggenerator/tst_qsvggenerator.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/auto') 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()); -- cgit v1.2.1