summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-10-07 17:49:28 +0100
committerSean Harmer <sean.harmer@kdab.com>2018-01-18 09:20:59 +0000
commit1ddff1b53ea19c965f187d947fdaed428d1ad05a (patch)
treedc1eebc8a7fcb49c5f752a10402ab77de34341aa /tests
parent3c037cc837d257f45d7a55d9fcf7aa5a29ebc00f (diff)
Add function to return name of a joint
Change-Id: Ia6fcf9014b25037c076e7dbce08941fb384ce527 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/animation/skeleton/tst_skeleton.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/animation/skeleton/tst_skeleton.cpp b/tests/auto/animation/skeleton/tst_skeleton.cpp
index 9e3cfef6d..6b7fc12f1 100644
--- a/tests/auto/animation/skeleton/tst_skeleton.cpp
+++ b/tests/auto/animation/skeleton/tst_skeleton.cpp
@@ -70,6 +70,24 @@ private Q_SLOTS:
QCOMPARE(backendSkeleton.jointLocalPoses().size(), 0);
}
+ void checkJointName()
+ {
+ // GIVEN
+ Skeleton backendSkeleton;
+ const QVector<QString> jointNames = { QLatin1String("rootJoint"),
+ QLatin1String("child1Joint"),
+ QLatin1String("child2Joint") };
+
+ // WHEN
+ backendSkeleton.setJointNames(jointNames);
+
+ // THEN
+ const int jointNameCount = jointNames.size();
+ for (int i = 0; i < jointNameCount; ++i) {
+ QCOMPARE(jointNames[i], backendSkeleton.jointName(i));
+ }
+ }
+
void checkInitialAndCleanedUpState()
{
// GIVEN