aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/particles/qquickrectangleextruder
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2012-03-07 08:02:44 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-07 06:24:33 +0100
commit83b4f5cc4f2661a41bbed4e17606a5e40bd06b7c (patch)
treeaa7bebfcc81a53ee999123f6c4aa05e75aceaca3 /tests/auto/particles/qquickrectangleextruder
parent72f4ccecf457eaa34469e9d7c2d05802214904d6 (diff)
Changed particles tests to work from install directory
- Changed particles tests to use TESTDATA - Changed particles tests to inherit from QQmlDataTest and use testFileUrl() to find test data Change-Id: Iae7c5111d976ec3efe473c40a3bab2f0a38c0969 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/particles/qquickrectangleextruder')
-rw-r--r--tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro5
-rw-r--r--tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp12
2 files changed, 10 insertions, 7 deletions
diff --git a/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro b/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro
index 1b5da6165c..683f77ec55 100644
--- a/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro
+++ b/tests/auto/particles/qquickrectangleextruder/qquickrectangleextruder.pro
@@ -3,9 +3,8 @@ TARGET = tst_qquickrectangleextruder
SOURCES += tst_qquickrectangleextruder.cpp
macx:CONFIG -= app_bundle
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+include (../../shared/util.pri)
+TESTDATA = data/*
QT += core-private gui-private v8-private qml-private quick-private opengl-private testlib
diff --git a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp
index a13fe230d2..570e23ab2d 100644
--- a/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp
+++ b/tests/auto/particles/qquickrectangleextruder/tst_qquickrectangleextruder.cpp
@@ -44,24 +44,28 @@
#include <private/qquickparticlesystem_p.h>
#include <private/qabstractanimation_p.h>
-class tst_qquickrectangleextruder : public QObject
+#include "../../shared/util.h"
+
+class tst_qquickrectangleextruder : public QQmlDataTest
{
Q_OBJECT
public:
- tst_qquickrectangleextruder();
+ tst_qquickrectangleextruder() {}
private slots:
+ void initTestCase();
void test_basic();
};
-tst_qquickrectangleextruder::tst_qquickrectangleextruder()
+void tst_qquickrectangleextruder::initTestCase()
{
+ QQmlDataTest::initTestCase();
QUnifiedTimer::instance()->setConsistentTiming(true);
}
void tst_qquickrectangleextruder::test_basic()
{
- QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600);
+ QQuickView* view = createView(testFileUrl("basic.qml"), 600);
QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system");
ensureAnimTime(600, system->m_animation);