aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/v4
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2011-10-12 13:46:02 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-14 02:39:59 +0200
commit6b497734df0c4f13f6b7185801fc69ce680c698c (patch)
tree66b0b8cd32a91f8c7e753a3ef124050188035c3c /tests/auto/declarative/v4
parent5f7c22001163eb4bce25be1cfee4e84c5a25ff09 (diff)
Use TESTDATA macro in declarative tests.
Includes a few other minor cleanups as well. Task-number: QTBUG-21721 Change-Id: I5b1c2c116e63748c6b4199183212de8a00037af1 Reviewed-on: http://codereview.qt-project.org/6473 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/declarative/v4')
-rw-r--r--tests/auto/declarative/v4/tst_v4.cpp4
-rw-r--r--tests/auto/declarative/v4/v4.pro4
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/declarative/v4/tst_v4.cpp b/tests/auto/declarative/v4/tst_v4.cpp
index 4c04e155bf..0b6b2c24f7 100644
--- a/tests/auto/declarative/v4/tst_v4.cpp
+++ b/tests/auto/declarative/v4/tst_v4.cpp
@@ -48,12 +48,12 @@
#include <private/qv4compiler_p.h>
+#include "../shared/util.h"
#include "testtypes.h"
inline QUrl TEST_FILE(const QString &filename)
{
- QFileInfo fileInfo(__FILE__);
- return QUrl::fromLocalFile(fileInfo.absoluteDir().filePath("data/" + filename));
+ return QUrl::fromLocalFile(TESTDATA(filename));
}
inline QUrl TEST_FILE(const char *filename)
diff --git a/tests/auto/declarative/v4/v4.pro b/tests/auto/declarative/v4/v4.pro
index 6a9574d8ed..04d20f0fc3 100644
--- a/tests/auto/declarative/v4/v4.pro
+++ b/tests/auto/declarative/v4/v4.pro
@@ -6,7 +6,9 @@ SOURCES += tst_v4.cpp \
testtypes.cpp
HEADERS += testtypes.h
-DEFINES += SRCDIR=\\\"$$PWD\\\"
+testDataFiles.files = data
+testDataFiles.path = .
+DEPLOYMENT += testDataFiles
CONFIG += parallel_test