diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-09-27 11:22:37 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-09-29 19:49:30 +0000 |
commit | aee10edf33ccb1faf3179b23b44a2ad48bf4d0f0 (patch) | |
tree | 26a0b71d7b1aa0bd6df9efe26dd388641d404245 /tests | |
parent | eee010020351c8aac94671dc6f34b17116f1f684 (diff) |
Remove unused buildPropertyMappings() overload and tests
Everything goes through the other overload now.
Change-Id: Id0c196a6967a9f83e47092ca1fc7f4ab4ebe9309
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/animation/animationutils/tst_animationutils.cpp | 73 |
1 files changed, 1 insertions, 72 deletions
diff --git a/tests/auto/animation/animationutils/tst_animationutils.cpp b/tests/auto/animation/animationutils/tst_animationutils.cpp index e1c52ed10..36e954a85 100644 --- a/tests/auto/animation/animationutils/tst_animationutils.cpp +++ b/tests/auto/animation/animationutils/tst_animationutils.cpp @@ -241,77 +241,6 @@ public: private Q_SLOTS: void checkBuildPropertyMappings_data() { - QTest::addColumn<Handler *>("handler"); - QTest::addColumn<QVector<ChannelMapping *>>("channelMappings"); - QTest::addColumn<ChannelMapper *>("channelMapper"); - QTest::addColumn<AnimationClip *>("clip"); - QTest::addColumn<QVector<MappingData>>("expectedMappingData"); - - auto handler = new Handler; - auto channelMapping = createChannelMapping(handler, - QLatin1String("Location"), - Qt3DCore::QNodeId::createId(), - QLatin1String("translation"), - "translation", - static_cast<int>(QVariant::Vector3D)); - QVector<ChannelMapping *> channelMappings; - channelMappings.push_back(channelMapping); - - // ... a channel mapper... - auto channelMapper = createChannelMapper(handler, QVector<Qt3DCore::QNodeId>() << channelMapping->peerId()); - - // ...and an animation clip - auto clip = createAnimationClipLoader(handler, QUrl("qrc:/clip1.json")); - - QVector<MappingData> mappingData; - MappingData mapping; - mapping.targetId = channelMapping->targetId(); - mapping.propertyName = channelMapping->propertyName(); // Location - mapping.type = channelMapping->type(); - mapping.channelIndices = QVector<int>() << 0 << 1 << 2; // Location X, Y, Z - mappingData.push_back(mapping); - - QTest::newRow("clip1.json") << handler - << channelMappings - << channelMapper - << clip - << mappingData; - } - - void checkBuildPropertyMappings() - { - // GIVEN - QFETCH(Handler *, handler); - QFETCH(QVector<ChannelMapping *>, channelMappings); - QFETCH(ChannelMapper *, channelMapper); - QFETCH(AnimationClip *, clip); - QFETCH(QVector<MappingData>, expectedMappingData); - - // WHEN - // Build the mapping data for the above configuration - QVector<MappingData> mappingData = buildPropertyMappings(handler, clip, channelMapper); - - // THEN - QCOMPARE(mappingData.size(), expectedMappingData.size()); - for (int i = 0; i < mappingData.size(); ++i) { - const auto mapping = mappingData[i]; - const auto expectedMapping = expectedMappingData[i]; - - QCOMPARE(mapping.targetId, expectedMapping.targetId); - QCOMPARE(mapping.propertyName, expectedMapping.propertyName); - QCOMPARE(mapping.type, expectedMapping.type); - QCOMPARE(mapping.channelIndices.size(), expectedMapping.channelIndices.size()); - for (int j = 0; j < mapping.channelIndices.size(); ++j) { - QCOMPARE(mapping.channelIndices[j], expectedMapping.channelIndices[j]); - } - } - - // Cleanup - delete handler; - } - - void checkBuildPropertyMappings2_data() - { QTest::addColumn<QVector<ChannelMapping *>>("channelMappings"); QTest::addColumn<QVector<ChannelNameAndType>>("channelNamesAndTypes"); QTest::addColumn<QVector<ComponentIndices>>("channelComponentIndices"); @@ -477,7 +406,7 @@ private Q_SLOTS: } } - void checkBuildPropertyMappings2() + void checkBuildPropertyMappings() { // GIVEN QFETCH(QVector<ChannelMapping *>, channelMappings); |