summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJuan Jose Casafranca <juan.casafranca@kdab.com>2018-07-03 11:48:48 +0200
committerJuan José Casafranca <juan.casafranca@kdab.com>2018-07-11 13:30:56 +0000
commitc39e20dcc693b525f2ee2259e864487d664c3856 (patch)
treec4331e8027cffabe5e96c874a099d1cd0b33b925 /tests
parentcb2405886dadffd3c787f64f2ca02c5f40810b72 (diff)
Check animator can be played in frontend and backend
We check that the animator can be played in the frontend. Each animator subclass must implement their own canPlay method. In the backend we correctly check the clipAnimator can be played Task-number: QTBUG-69369 Change-Id: If8bca9b73321e2bfdb4d68ddc286df0109ee91f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/animation/qclipanimator/tst_qclipanimator.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
index f41803b13..0b28228d9 100644
--- a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
+++ b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
@@ -155,6 +155,33 @@ private Q_SLOTS:
}
}
+ void checkRunning()
+ {
+ // GIVEN
+ Qt3DAnimation::QClipAnimator animator;
+ animator.stop();
+
+ {
+ // WHEN
+ animator.setRunning(true);
+
+ // THEN
+ QCOMPARE(animator.isRunning(), false);
+ }
+
+ {
+ // WHEN
+ Qt3DAnimation::QChannelMapper *mapper = new Qt3DAnimation::QChannelMapper;
+ Qt3DAnimation::QAnimationClip *clip = new Qt3DAnimation::QAnimationClip;
+ animator.setClip(clip);
+ animator.setChannelMapper(mapper);
+ animator.setRunning(true);
+
+ // THEN
+ QCOMPARE(animator.isRunning(), true);
+ }
+ }
+
void checkCreationData()
{
// GIVEN