aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-12-21 09:06:26 +0100
committerQt by Nokia <qt-info@nokia.com>2011-12-21 15:35:22 +0100
commit8249c72213bc7d212c05aa086b3145a5742706a3 (patch)
tree4a34b97b0d57a05707c65b7328d5ab1bf4254920 /tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
parent3c211558f6b571555558bd1fc59774e36a6da710 (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/qdeclarativeerror/tst_qdeclarativeerror.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
index 8fab5e5e50..3f204de2bd 100644
--- a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
+++ b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp
@@ -44,7 +44,7 @@
#include <QDebug>
#include "../../shared/util.h"
-class tst_qdeclarativeerror : public QObject
+class tst_qdeclarativeerror : public QDeclarativeDataTest
{
Q_OBJECT
private slots:
@@ -208,7 +208,7 @@ void tst_qdeclarativeerror::debug()
}
{
- QUrl url(QUrl::fromLocalFile(TESTDATA("")).resolved(QUrl("test.txt")));
+ QUrl url(dataDirectoryUrl().resolved(QUrl("test.txt")));
QDeclarativeError error;
error.setUrl(url);
error.setDescription("An Error");
@@ -222,7 +222,7 @@ void tst_qdeclarativeerror::debug()
}
{
- QUrl url(QUrl::fromLocalFile(TESTDATA("")).resolved(QUrl("foo.txt")));
+ QUrl url(dataDirectoryUrl().resolved(QUrl("foo.txt")));
QDeclarativeError error;
error.setUrl(url);
error.setDescription("An Error");