aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp')
-rw-r--r--tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp b/tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp
index ea1d4ee6cf..dbb23ff29e 100644
--- a/tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp
+++ b/tests/auto/particles/qsgangleddirection/tst_qsgangleddirection.cpp
@@ -43,6 +43,7 @@
#include <qmath.h>
#include "../shared/particlestestsshared.h"
#include <private/qsgparticlesystem_p.h>
+#include <private/qabstractanimation_p.h>
class tst_qsgangleddirection : public QObject
{
@@ -56,12 +57,14 @@ private slots:
tst_qsgangleddirection::tst_qsgangleddirection()
{
+ QUnifiedTimer::instance()->setConsistentTiming(true);
}
void tst_qsgangleddirection::test_basic()
{
QSGView* view = createView(QCoreApplication::applicationDirPath() + "/data/basic.qml", 600);
QSGParticleSystem* system = view->rootObject()->findChild<QSGParticleSystem*>("system");
+ ensureAnimTime(600, system->m_animation);
QCOMPARE(system->groupData[0]->size(), 500);
foreach (QSGParticleData *d, system->groupData[0]->data) {
@@ -80,7 +83,7 @@ void tst_qsgangleddirection::test_basic()
QCOMPARE(d->lifeSpan, 0.5f);
QCOMPARE(d->size, 32.f);
QCOMPARE(d->endSize, 32.f);
- QVERIFY(d->t <= ((qreal)system->timeInt/1000.0));
+ QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0)));
}
}