diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-08-06 19:22:07 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-08-10 10:41:40 +0000 |
commit | 490fc79f93afa30fc2a6f38b0c3f605b317ae359 (patch) | |
tree | 6b7f89c528406852e3dd705a90054389e305e110 /tests | |
parent | a6d0a8c1b93544eeb11cad4da0e86e8d117f6b5b (diff) |
Change scale property of QJoint to QVector3D
Seems to be the norm for joints.
Change-Id: I98d786b64153b09e2cd06e9d525f6c80f6372316
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/core/qjoint/tst_qjoint.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/core/qjoint/tst_qjoint.cpp b/tests/auto/core/qjoint/tst_qjoint.cpp index 60c80bfe5..446e68773 100644 --- a/tests/auto/core/qjoint/tst_qjoint.cpp +++ b/tests/auto/core/qjoint/tst_qjoint.cpp @@ -49,7 +49,7 @@ private Q_SLOTS: QJoint joint; // THEN - QCOMPARE(joint.scale(), 1.0f); + QCOMPARE(joint.scale(), QVector3D(1.0f, 1.0f, 1.0f)); QCOMPARE(joint.rotation(), QQuaternion()); QCOMPARE(joint.translation(), QVector3D(0.0f, 0.0f, 0.0f)); } @@ -61,8 +61,8 @@ private Q_SLOTS: { // WHEN - QSignalSpy spy(&joint, SIGNAL(scaleChanged(float))); - const float newValue(2.5f); + QSignalSpy spy(&joint, SIGNAL(scaleChanged(QVector3D))); + const QVector3D newValue(2.5f, 2.0f, 1.3f); joint.setScale(newValue); // THEN @@ -125,7 +125,7 @@ private Q_SLOTS: // GIVEN QJoint joint; - joint.setScale(3.5f); + joint.setScale(QVector3D(3.5f, 2.0f, 1.3f)); joint.setRotation(QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, 30.0f)); joint.setTranslation(QVector3D(3.0f, 2.0f, 1.0f)); @@ -189,7 +189,7 @@ private Q_SLOTS: { // WHEN - joint.setScale(2.0f); + joint.setScale(QVector3D(2.0f, 1.0f, 3.0f)); QCoreApplication::processEvents(); // THEN @@ -197,12 +197,12 @@ private Q_SLOTS: auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>(); QCOMPARE(change->propertyName(), "scale"); QCOMPARE(change->type(), Qt3DCore::PropertyUpdated); - QCOMPARE(change->value().toFloat(), joint.scale()); + QCOMPARE(change->value().value<QVector3D>(), joint.scale()); arbiter.events.clear(); // WHEN - joint.setScale(2.0f); + joint.setScale(QVector3D(2.0f, 1.0f, 3.0f)); QCoreApplication::processEvents(); // THEN |