diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-10-12 13:46:02 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-14 02:39:59 +0200 |
commit | 6b497734df0c4f13f6b7185801fc69ce680c698c (patch) | |
tree | 66b0b8cd32a91f8c7e753a3ef124050188035c3c /tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp | |
parent | 5f7c22001163eb4bce25be1cfee4e84c5a25ff09 (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/qdeclarativebinding/tst_qdeclarativebinding.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp index 1109e53c3e..92b3c2b72c 100644 --- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp +++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp @@ -43,6 +43,7 @@ #include <QtDeclarative/qdeclarativecomponent.h> #include <private/qdeclarativebind_p.h> #include <private/qsgrectangle_p.h> +#include "../shared/util.h" #include "../../../shared/util.h" class tst_qdeclarativebinding : public QObject @@ -69,7 +70,7 @@ tst_qdeclarativebinding::tst_qdeclarativebinding() void tst_qdeclarativebinding::binding() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-binding.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-binding.qml"))); QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); QVERIFY(rect != 0); @@ -97,7 +98,7 @@ void tst_qdeclarativebinding::binding() void tst_qdeclarativebinding::whenAfterValue() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-binding2.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-binding2.qml"))); QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); QVERIFY(rect != 0); @@ -113,7 +114,7 @@ void tst_qdeclarativebinding::whenAfterValue() void tst_qdeclarativebinding::restoreBinding() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/restoreBinding.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("restoreBinding.qml"))); QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); QVERIFY(rect != 0); @@ -143,7 +144,7 @@ void tst_qdeclarativebinding::restoreBinding() void tst_qdeclarativebinding::restoreBindingWithLoop() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/restoreBindingWithLoop.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("restoreBindingWithLoop.qml"))); QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); QVERIFY(rect != 0); @@ -178,7 +179,7 @@ void tst_qdeclarativebinding::restoreBindingWithLoop() void tst_qdeclarativebinding::deletedObject() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/deletedObject.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("deletedObject.qml"))); QSGRectangle *rect = qobject_cast<QSGRectangle*>(c.create()); QVERIFY(rect != 0); |