summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@theqtcompany.com>2015-01-28 10:02:57 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-28 09:27:40 +0000
commitd009c500b624b12be55a21c09286245c5bd1a36e (patch)
tree15ecc0cd2e112c03c71c672a1c6c700fdf37c929
parent26f9b9bab54ae9cbb86bd7783f226f6032834c06 (diff)
downloadqtlocation-d009c500b624b12be55a21c09286245c5bd1a36e.tar.gz
Autotest: Use resources for test data
Change-Id: Ica875c000e257f4a9e7094f03ec9e156d39e1d05 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r--tests/auto/geotestplugin/geotestplugin.pro1
-rw-r--r--tests/auto/geotestplugin/qplacemanagerengine_test.h1
-rw-r--r--tests/auto/geotestplugin/testdata.qrc5
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/geotestplugin/geotestplugin.pro b/tests/auto/geotestplugin/geotestplugin.pro
index 4b50989f..0945e4fe 100644
--- a/tests/auto/geotestplugin/geotestplugin.pro
+++ b/tests/auto/geotestplugin/geotestplugin.pro
@@ -20,3 +20,4 @@ OTHER_FILES += \
geotestplugin.json \
place_data.json
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+RESOURCES += testdata.qrc
diff --git a/tests/auto/geotestplugin/qplacemanagerengine_test.h b/tests/auto/geotestplugin/qplacemanagerengine_test.h
index e6a09da9..856e2de2 100644
--- a/tests/auto/geotestplugin/qplacemanagerengine_test.h
+++ b/tests/auto/geotestplugin/qplacemanagerengine_test.h
@@ -206,6 +206,7 @@ public:
m_locales << QLocale();
if (parameters.value(QStringLiteral("initializePlaceData"), false).toBool()) {
QFile placeData(QFINDTESTDATA("place_data.json"));
+ QVERIFY(placeData.exists());
if (placeData.open(QIODevice::ReadOnly)) {
QJsonDocument document = QJsonDocument::fromJson(placeData.readAll());
diff --git a/tests/auto/geotestplugin/testdata.qrc b/tests/auto/geotestplugin/testdata.qrc
new file mode 100644
index 00000000..23eed23e
--- /dev/null
+++ b/tests/auto/geotestplugin/testdata.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>place_data.json</file>
+ </qresource>
+</RCC>