summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-04-07 14:40:51 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-04-11 09:27:30 +0000
commit8eee273390f9b0d91cb805f1fa7cb51be4717c2b (patch)
treea87d8a2c95e8c58eee8a7e0887ddb18bc1761413 /tests
parente8c351478fe9f2b8bb5381480fbb3637855f145e (diff)
Use interpolation enum from QKeyFrame
No point in duplicating this on the backend just for the sake of it. Change-Id: I1852f7f22d5519b260ed90adce3715ab4257df61 Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/animation/bezierevaluator/tst_bezierevaluator.cpp9
-rw-r--r--tests/auto/animation/fcurve/tst_fcurve.cpp9
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/auto/animation/bezierevaluator/tst_bezierevaluator.cpp b/tests/auto/animation/bezierevaluator/tst_bezierevaluator.cpp
index 746af8d55..5dc971ab7 100644
--- a/tests/auto/animation/bezierevaluator/tst_bezierevaluator.cpp
+++ b/tests/auto/animation/bezierevaluator/tst_bezierevaluator.cpp
@@ -35,6 +35,7 @@
Q_DECLARE_METATYPE(Qt3DAnimation::Animation::Keyframe)
+using namespace Qt3DAnimation;
using namespace Qt3DAnimation::Animation;
class tst_BezierEvaluator : public QObject
@@ -131,9 +132,9 @@ private Q_SLOTS:
QTest::addColumn<QVector<float>>("bezierParamters");
float t0 = 0.0f;
- Keyframe kf0{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, Keyframe::Bezier};
+ Keyframe kf0{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, QKeyFrame::BezierInterpolation};
float t1 = 50.0f;
- Keyframe kf1{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, Keyframe::Bezier};
+ Keyframe kf1{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, QKeyFrame::BezierInterpolation};
const int count = 21;
QVector<float> times = (QVector<float>()
<< 0.0f
@@ -199,9 +200,9 @@ private Q_SLOTS:
QTest::addColumn<QVector<float>>("values");
float t0 = 0.0f;
- Keyframe kf0{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, Keyframe::Bezier};
+ Keyframe kf0{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, QKeyFrame::BezierInterpolation};
float t1 = 50.0f;
- Keyframe kf1{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, Keyframe::Bezier};
+ Keyframe kf1{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, QKeyFrame::BezierInterpolation};
QVector<float> times = (QVector<float>()
<< 0.0f
<< 1.00375f
diff --git a/tests/auto/animation/fcurve/tst_fcurve.cpp b/tests/auto/animation/fcurve/tst_fcurve.cpp
index 8cd8b9537..e3e8db50d 100644
--- a/tests/auto/animation/fcurve/tst_fcurve.cpp
+++ b/tests/auto/animation/fcurve/tst_fcurve.cpp
@@ -29,6 +29,7 @@
#include <QtTest/QTest>
#include <private/fcurve_p.h>
+using namespace Qt3DAnimation;
using namespace Qt3DAnimation::Animation;
class tst_FCurve : public QObject
@@ -53,7 +54,7 @@ private Q_SLOTS:
FCurve fcurve;
// WHEN
- const Keyframe kf0{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, Keyframe::Bezier};
+ const Keyframe kf0{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, QKeyFrame::BezierInterpolation};
fcurve.appendKeyframe(0.0f, kf0);
// THEN
@@ -62,7 +63,7 @@ private Q_SLOTS:
QCOMPARE(fcurve.endTime(), 0.0f);
// WHEN
- const Keyframe kf1{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, Keyframe::Bezier};
+ const Keyframe kf1{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, QKeyFrame::BezierInterpolation};
fcurve.appendKeyframe(50.0f, kf1);
// THEN
@@ -77,8 +78,8 @@ private Q_SLOTS:
{
// GIVEN
FCurve fcurve;
- fcurve.appendKeyframe(0.0f, Keyframe{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, Keyframe::Bezier});
- fcurve.appendKeyframe(50.0f, Keyframe{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, Keyframe::Bezier});
+ fcurve.appendKeyframe(0.0f, Keyframe{0.0f, {-5.0f, 0.0f}, {5.0f, 0.0f}, QKeyFrame::BezierInterpolation});
+ fcurve.appendKeyframe(50.0f, Keyframe{5.0f, {45.0f, 5.0f}, {55.0f, 5.0f}, QKeyFrame::BezierInterpolation});
// WHEN
fcurve.clearKeyframes();