diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-12-21 09:06:26 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-21 15:35:22 +0100 |
commit | 8249c72213bc7d212c05aa086b3145a5742706a3 (patch) | |
tree | 4a34b97b0d57a05707c65b7328d5ab1bf4254920 /tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp | |
parent | 3c211558f6b571555558bd1fc59774e36a6da710 (diff) |
QDeclarative tests: Introduce base class for data tests.
In tests/auto/shared/util.* replace macros/find functions by
a base class QDeclarativeDataTest with accessors for the
data directory helper functions to create URLs from it.
The class relies on QFINDTESTDATA, which is the standard
way of locating test data. Using the class should reduce
the number of calls to QFileInfo.exists(), etc significantly.
In addition, provide utility functions for messages.
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Change-Id: Id2beacb157922ee9412f9e45cf9695cec1f8379a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp')
-rw-r--r-- | tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp index 0f9da032e8..4b6e863df9 100644 --- a/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp +++ b/tests/auto/declarative/debugger/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp @@ -159,7 +159,7 @@ do {\ class QJSDebugClient; -class tst_QDeclarativeDebugJS : public QObject +class tst_QDeclarativeDebugJS : public QDeclarativeDataTest { Q_OBJECT @@ -982,6 +982,7 @@ QByteArray QJSDebugClient::packMessage(const QByteArray &type, const QByteArray void tst_QDeclarativeDebugJS::initTestCase() { + QDeclarativeDataTest::initTestCase(); t.start(); process = 0; client = 0; @@ -1014,9 +1015,9 @@ bool tst_QDeclarativeDebugJS::init(const QString &qmlFile, bool blockMode) systemEnvironment << "QML_DISABLE_OPTIMIZER=1"; process->setEnvironment(systemEnvironment); if (blockMode) - process->start(QStringList() << QLatin1String(BLOCKMODE) << TESTDATA(qmlFile)); + process->start(QStringList() << QLatin1String(BLOCKMODE) << testFile(qmlFile)); else - process->start(QStringList() << QLatin1String(NORMALMODE) << TESTDATA(qmlFile)); + process->start(QStringList() << QLatin1String(NORMALMODE) << testFile(qmlFile)); if (!process->waitForSessionStart()) { return false; |