summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-03-24 16:21:19 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-03-26 07:29:57 +0000
commit5a7fdcaf649a51be5f18dc3ef1fbea26b0dbdef1 (patch)
treec62bfa5b07ac1a601d6b35c9f4ea41ded4e5c9fa /tests
parent57d700a414dd8e6fa301865771b9c738bb7aa8c6 (diff)
Make ClipBlendNodeVisitor use allDependencyIds()
Instead of childrenIds() which no longer makes sense since we do not use the parent/child relationship to define the tree but rather explicit properties on each node type. Change-Id: Ia2a20a62d5f51acbbb364f6b5bd1ffebdbc8a28c Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/animation/clipblendnodevisitor/tst_clipblendnodevisitor.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/auto/animation/clipblendnodevisitor/tst_clipblendnodevisitor.cpp b/tests/auto/animation/clipblendnodevisitor/tst_clipblendnodevisitor.cpp
index 9aa3218e9..3f705e713 100644
--- a/tests/auto/animation/clipblendnodevisitor/tst_clipblendnodevisitor.cpp
+++ b/tests/auto/animation/clipblendnodevisitor/tst_clipblendnodevisitor.cpp
@@ -46,8 +46,12 @@ private Q_SLOTS:
Qt3DAnimation::QLerpClipBlend rootBlendNode;
Qt3DAnimation::QLerpClipBlend childBlendNode1(&rootBlendNode);
Qt3DAnimation::QLerpClipBlend childBlendNode2(&rootBlendNode);
+ rootBlendNode.setStartClip(&childBlendNode1);
+ rootBlendNode.setEndClip(&childBlendNode2);
Qt3DAnimation::QLerpClipBlend childBlendNode11(&childBlendNode1);
Qt3DAnimation::QLerpClipBlend childBlendNode12(&childBlendNode1);
+ childBlendNode1.setStartClip(&childBlendNode11);
+ childBlendNode1.setEndClip(&childBlendNode12);
Qt3DAnimation::Animation::LerpClipBlend *backendRootBlendNode = new Qt3DAnimation::Animation::LerpClipBlend();
Qt3DAnimation::Animation::LerpClipBlend *backendChildBlendNode1 = new Qt3DAnimation::Animation::LerpClipBlend();
@@ -76,11 +80,11 @@ private Q_SLOTS:
simulateInitialization(&childBlendNode12, backendChildBlendNode12);
// THEN
- QCOMPARE(backendRootBlendNode->childrenIds().size(), 2);
- QCOMPARE(backendChildBlendNode1->childrenIds().size(), 2);
- QCOMPARE(backendChildBlendNode2->childrenIds().size(), 0);
- QCOMPARE(backendChildBlendNode11->childrenIds().size(), 0);
- QCOMPARE(backendChildBlendNode12->childrenIds().size(), 0);
+ QCOMPARE(backendRootBlendNode->allDependencyIds().size(), 2);
+ QCOMPARE(backendChildBlendNode1->allDependencyIds().size(), 2);
+ QCOMPARE(backendChildBlendNode2->allDependencyIds().size(), 2);
+ QCOMPARE(backendChildBlendNode11->allDependencyIds().size(), 2);
+ QCOMPARE(backendChildBlendNode12->allDependencyIds().size(), 2);
// WHEN
int i = 0;
@@ -120,7 +124,7 @@ private Q_SLOTS:
simulateInitialization(&rootBlendNode, backendRootBlendNode);
// THEN
- QCOMPARE(backendRootBlendNode->childrenIds().size(), 0);
+ QCOMPARE(backendRootBlendNode->allDependencyIds().size(), 2);
// WHEN
auto childCounter = [] (Qt3DAnimation::Animation::ClipBlendNode *) {};
@@ -136,6 +140,8 @@ private Q_SLOTS:
Qt3DAnimation::QLerpClipBlend rootBlendNode;
Qt3DAnimation::QLerpClipBlend childBlendNode1(&rootBlendNode);
Qt3DAnimation::QLerpClipBlend childBlendNode2(&rootBlendNode);
+ rootBlendNode.setStartClip(&childBlendNode1);
+ rootBlendNode.setEndClip(&childBlendNode2);
Qt3DAnimation::Animation::LerpClipBlend *backendRootBlendNode = new Qt3DAnimation::Animation::LerpClipBlend();
Qt3DAnimation::Animation::LerpClipBlend *backendChildBlendNode1 = new Qt3DAnimation::Animation::LerpClipBlend();
@@ -158,9 +164,9 @@ private Q_SLOTS:
simulateInitialization(&childBlendNode2, backendChildBlendNode2);
// THEN
- QCOMPARE(backendRootBlendNode->childrenIds().size(), 2);
- QCOMPARE(backendChildBlendNode1->childrenIds().size(), 0);
- QCOMPARE(backendChildBlendNode2->childrenIds().size(), 0);
+ QCOMPARE(backendRootBlendNode->allDependencyIds().size(), 2);
+ QCOMPARE(backendChildBlendNode1->allDependencyIds().size(), 2);
+ QCOMPARE(backendChildBlendNode2->allDependencyIds().size(), 2);
// WHEN
int i = 0;