aboutsummaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/particles/affectors/tst_affectors.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-05-08 11:01:22 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-05-10 07:45:55 +0000
commit9064d077e411aab9a2aea9f9e5a14ae029a94e14 (patch)
treeafd1e40f40eea4bacb5e5d6790fbfe3153dda3b9 /tests/benchmarks/particles/affectors/tst_affectors.cpp
parent5346da3f11f52530ef3c14d4ff16124b86f922e1 (diff)
Fix qml file loading for tst_affectors
Change-Id: Ifb1b6f6d71d42c1642167725526c054f1dce0c90 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'tests/benchmarks/particles/affectors/tst_affectors.cpp')
-rw-r--r--tests/benchmarks/particles/affectors/tst_affectors.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/benchmarks/particles/affectors/tst_affectors.cpp b/tests/benchmarks/particles/affectors/tst_affectors.cpp
index 99d175564b..4c611c6faa 100644
--- a/tests/benchmarks/particles/affectors/tst_affectors.cpp
+++ b/tests/benchmarks/particles/affectors/tst_affectors.cpp
@@ -48,6 +48,11 @@ tst_affectors::tst_affectors()
{
}
+inline QUrl TEST_FILE(const QString &filename)
+{
+ return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename);
+}
+
void tst_affectors::test_basic_data()
{
QTest::addColumn<int> ("dt");
@@ -69,7 +74,7 @@ void tst_affectors::test_filtered_data()
void tst_affectors::test_basic()
{
QFETCH(int, dt);
- QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml");
+ QQuickView* view = createView(TEST_FILE("basic.qml"));
QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system");
//Pretend we're running, but we manually advance the simulation
system->m_running = true;
@@ -109,7 +114,7 @@ void tst_affectors::test_basic()
void tst_affectors::test_filtered()
{
QFETCH(int, dt);
- QQuickView* view = createView(QCoreApplication::applicationDirPath() + "/data/filtered.qml");
+ QQuickView* view = createView(TEST_FILE("filtered.qml"));
QQuickParticleSystem* system = view->rootObject()->findChild<QQuickParticleSystem*>("system");
//Pretend we're running, but we manually advance the simulation
system->m_running = true;