summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2010-11-23 10:58:46 +0200
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2010-12-06 10:37:19 +0200
commit1ba320366e1b010ecf32c263574e183e4b1f452d (patch)
tree87976c9795ef0324f46022a6bc66d5071ef4c6cc /tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
parentd3dc2ab3e0ee6bca8eca374e3cb3b3f4c7d0c34e (diff)
Move test data to a qrc file.
Using qrc file simplify deployment on a device. Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp')
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
index 5f9a578b3b..912027e740 100644
--- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
+++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
@@ -45,10 +45,6 @@
#include <QtScript>
-#if defined(Q_OS_SYMBIAN)
-# define SRCDIR ""
-#endif
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -217,9 +213,8 @@ int tst_Suite::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
tst_Suite::tst_Suite()
{
- testsDir = QDir(SRCDIR);
- bool testsFound = testsDir.cd("tests");
- if (!testsFound) {
+ testsDir = QDir(":/tests");
+ if (!testsDir.exists()) {
qWarning("*** no tests/ dir!");
} else {
if (!testsDir.exists("mjsunit.js"))
@@ -297,8 +292,7 @@ tst_Suite::tst_Suite()
appendCString(stringdata, "");
QFileInfoList testFileInfos;
- if (testsFound)
- testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files);
+ testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files);
foreach (QFileInfo tfi, testFileInfos) {
QString name = tfi.baseName();
// slot: signature, parameters, type, tag, flags