diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-08-26 15:09:06 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-09-02 18:10:34 +0000 |
commit | df1d871a83b415313a02415366dd0682944ad211 (patch) | |
tree | cb1f3b428b79af2e9d7fe3279541a4a18c9f9b48 | |
parent | bbb9b6c25650fc17868c47d9c82501f9068dd158 (diff) |
Extend checkAssignChannelComponentIndices test to cover indexed target
Change-Id: Ic2cd9504c454b96037ce2fcc061b4d38d2f0c2fd
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | tests/auto/animation/animationutils/tst_animationutils.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/auto/animation/animationutils/tst_animationutils.cpp b/tests/auto/animation/animationutils/tst_animationutils.cpp index ae68381f0..31cc54b60 100644 --- a/tests/auto/animation/animationutils/tst_animationutils.cpp +++ b/tests/auto/animation/animationutils/tst_animationutils.cpp @@ -2616,6 +2616,35 @@ private Q_SLOTS: QTest::newRow("vec3 location, quaterion rotation, pbr metal-rough") << allChannels << expectedResults; } + + { + QVector<ChannelNameAndType> allChannels; + const int jointCount = 4; + for (int i = 0; i < jointCount; ++i) { + allChannels.push_back({ QLatin1String("Location"), static_cast<int>(QVariant::Vector3D), i }); + allChannels.push_back({ QLatin1String("Rotation"), static_cast<int>(QVariant::Quaternion), i }); + allChannels.push_back({ QLatin1String("Scale"), static_cast<int>(QVariant::Vector3D), i }); + } + + QVector<ComponentIndices> expectedResults; + expectedResults.push_back({ 0, 1, 2 }); + expectedResults.push_back({ 3, 4, 5, 6 }); + expectedResults.push_back({ 7, 8, 9 }); + + expectedResults.push_back({ 10, 11, 12 }); + expectedResults.push_back({ 13, 14, 15, 16 }); + expectedResults.push_back({ 17, 18, 19 }); + + expectedResults.push_back({ 20, 21, 22 }); + expectedResults.push_back({ 23, 24, 25, 26 }); + expectedResults.push_back({ 27, 28, 29 }); + + expectedResults.push_back({ 30, 31, 32 }); + expectedResults.push_back({ 33, 34, 35, 36 }); + expectedResults.push_back({ 37, 38, 39 }); + + QTest::newRow("skeleton, 4 joints") << allChannels << expectedResults; + } } void checkAssignChannelComponentIndices() |