diff options
Diffstat (limited to 'tests/auto/particles/shared/particlestestsshared.h')
-rw-r--r-- | tests/auto/particles/shared/particlestestsshared.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/particles/shared/particlestestsshared.h b/tests/auto/particles/shared/particlestestsshared.h index 66e880fc5b..ed483bae01 100644 --- a/tests/auto/particles/shared/particlestestsshared.h +++ b/tests/auto/particles/shared/particlestestsshared.h @@ -43,6 +43,7 @@ #define PARTICLES_TESTS_SHARED #include <QSGView> #include <QtTest> +#include <QAbstractAnimation> const qreal EPSILON = 0.0001; bool extremelyFuzzyCompare(qreal a, qreal b, qreal e)//For cases which can have larger variances @@ -80,4 +81,10 @@ QSGView* createView(const QString &filename, int additionalWait=0) return canvas; } +void ensureAnimTime(int requiredTime, QAbstractAnimation* anim)//With consistentTiming, who knows how long an animation really takes... +{ + while (anim->currentTime() < requiredTime) + QTest::qWait(100); +} + #endif |