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/qsgflipable/tst_qsgflipable.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/qsgflipable/tst_qsgflipable.cpp')
-rw-r--r-- | tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp b/tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp index 3d53f12095..2fc1924c9a 100644 --- a/tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp +++ b/tests/auto/declarative/qsgflipable/tst_qsgflipable.cpp @@ -48,6 +48,7 @@ #include <private/qsgrectangle_p.h> #include <math.h> #include <QtOpenGL/QGLShaderProgram> +#include "../shared/util.h" class tst_qsgflipable : public QObject { @@ -85,7 +86,7 @@ void tst_qsgflipable::cleanupTestCase() void tst_qsgflipable::create() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-flipable.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml"))); QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create()); QVERIFY(obj != 0); @@ -95,7 +96,7 @@ void tst_qsgflipable::create() void tst_qsgflipable::checkFrontAndBack() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-flipable.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml"))); QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create()); QVERIFY(obj != 0); @@ -107,7 +108,7 @@ void tst_qsgflipable::checkFrontAndBack() void tst_qsgflipable::setFrontAndBack() { QDeclarativeEngine engine; - QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/test-flipable.qml")); + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(TESTDATA("test-flipable.qml"))); QSGFlipable *obj = qobject_cast<QSGFlipable*>(c.create()); QVERIFY(obj != 0); @@ -127,7 +128,7 @@ void tst_qsgflipable::setFrontAndBack() void tst_qsgflipable::QTBUG_9161_crash() { QSGView *canvas = new QSGView; - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/crash.qml")); + canvas->setSource(QUrl::fromLocalFile(TESTDATA("crash.qml"))); QSGItem *root = canvas->rootObject(); QVERIFY(root != 0); canvas->show(); @@ -137,7 +138,7 @@ void tst_qsgflipable::QTBUG_9161_crash() void tst_qsgflipable::QTBUG_8474_qgv_abort() { QSGView *canvas = new QSGView; - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/flipable-abort.qml")); + canvas->setSource(QUrl::fromLocalFile(TESTDATA("flipable-abort.qml"))); QSGItem *root = canvas->rootObject(); QVERIFY(root != 0); canvas->show(); |