diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-04-07 16:40:55 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-04-12 18:37:29 +0000 |
commit | 7fccf4f96efab3daaeef7fceceaeea776b50ff0a (patch) | |
tree | a33eb9fd85f7d32b298d157522c5f02bf72e3bec /tests | |
parent | 90667286d9ab851f6735fc53dd7aaa3881167b3d (diff) |
Rename AnimationClipLoader to AnimationClip
It handles both loadign from file and from data constructed using the
public API.
Change-Id: Ic9e71dc60c36869548323312f7129df6c9edd763
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/animation/animation.pro | 2 | ||||
-rw-r--r-- | tests/auto/animation/animationclip/animationclip.pro (renamed from tests/auto/animation/animationcliploader/animationcliploader.pro) | 4 | ||||
-rw-r--r-- | tests/auto/animation/animationclip/tst_animationclip.cpp (renamed from tests/auto/animation/animationcliploader/tst_animationcliploader.cpp) | 20 | ||||
-rw-r--r-- | tests/auto/animation/animationutils/tst_animationutils.cpp | 52 | ||||
-rw-r--r-- | tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp | 4 | ||||
-rw-r--r-- | tests/auto/animation/qclipanimator/tst_qclipanimator.cpp | 2 |
6 files changed, 42 insertions, 42 deletions
diff --git a/tests/auto/animation/animation.pro b/tests/auto/animation/animation.pro index eeb9a70af..969f477e7 100644 --- a/tests/auto/animation/animation.pro +++ b/tests/auto/animation/animation.pro @@ -11,7 +11,7 @@ SUBDIRS += \ qtConfig(private_tests) { SUBDIRS += \ - animationcliploader \ + animationclip \ fcurve \ functionrangefinder \ bezierevaluator \ diff --git a/tests/auto/animation/animationcliploader/animationcliploader.pro b/tests/auto/animation/animationclip/animationclip.pro index b1bc6dbcc..09d9f2523 100644 --- a/tests/auto/animation/animationcliploader/animationcliploader.pro +++ b/tests/auto/animation/animationclip/animationclip.pro @@ -1,12 +1,12 @@ TEMPLATE = app -TARGET = tst_animationcliploader +TARGET = tst_animationclip QT += core-private 3dcore 3dcore-private 3danimation 3danimation-private testlib CONFIG += testcase SOURCES += \ - tst_animationcliploader.cpp + tst_animationclip.cpp include(../../core/common/common.pri) diff --git a/tests/auto/animation/animationcliploader/tst_animationcliploader.cpp b/tests/auto/animation/animationclip/tst_animationclip.cpp index 09798e7d6..96a004804 100644 --- a/tests/auto/animation/animationcliploader/tst_animationcliploader.cpp +++ b/tests/auto/animation/animationclip/tst_animationclip.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ #include <QtTest/QTest> -#include <Qt3DAnimation/private/animationcliploader_p.h> +#include <Qt3DAnimation/private/animationclip_p.h> #include <Qt3DAnimation/qanimationcliploader.h> #include <Qt3DCore/private/qnode_p.h> #include <Qt3DCore/private/qscene_p.h> @@ -37,7 +37,7 @@ #include <qbackendnodetester.h> #include <testpostmanarbiter.h> -class tst_AnimationClipLoader: public Qt3DCore::QBackendNodeTester +class tst_AnimationClip : public Qt3DCore::QBackendNodeTester { Q_OBJECT @@ -45,7 +45,7 @@ private Q_SLOTS: void checkPeerPropertyMirroring() { // GIVEN - Qt3DAnimation::Animation::AnimationClipLoader backendClip; + Qt3DAnimation::Animation::AnimationClip backendClip; Qt3DAnimation::Animation::Handler handler; backendClip.setHandler(&handler); Qt3DAnimation::QAnimationClipLoader clip; @@ -64,7 +64,7 @@ private Q_SLOTS: void checkInitialAndCleanedUpState() { // GIVEN - Qt3DAnimation::Animation::AnimationClipLoader backendClip; + Qt3DAnimation::Animation::AnimationClip backendClip; Qt3DAnimation::Animation::Handler handler; backendClip.setHandler(&handler); @@ -94,10 +94,10 @@ private Q_SLOTS: void checkPropertyChanges() { // GIVEN - Qt3DAnimation::Animation::AnimationClipLoader backendClip; + Qt3DAnimation::Animation::AnimationClip backendClip; Qt3DAnimation::Animation::Handler handler; backendClip.setHandler(&handler); - backendClip.setDataType(Qt3DAnimation::Animation::AnimationClipLoader::File); + backendClip.setDataType(Qt3DAnimation::Animation::AnimationClip::File); Qt3DCore::QPropertyUpdatedChangePtr updateChange; // WHEN @@ -124,7 +124,7 @@ private Q_SLOTS: { // GIVEN TestArbiter arbiter; - Qt3DAnimation::Animation::AnimationClipLoader backendClip; + Qt3DAnimation::Animation::AnimationClip backendClip; backendClip.setEnabled(true); Qt3DCore::QBackendNodePrivate::get(&backendClip)->setArbiter(&arbiter); @@ -156,7 +156,7 @@ private Q_SLOTS: { // GIVEN TestArbiter arbiter; - Qt3DAnimation::Animation::AnimationClipLoader backendClip; + Qt3DAnimation::Animation::AnimationClip backendClip; backendClip.setEnabled(true); Qt3DCore::QBackendNodePrivate::get(&backendClip)->setArbiter(&arbiter); @@ -185,6 +185,6 @@ private Q_SLOTS: } }; -QTEST_APPLESS_MAIN(tst_AnimationClipLoader) +QTEST_APPLESS_MAIN(tst_AnimationClip) -#include "tst_animationcliploader.moc" +#include "tst_animationclip.moc" diff --git a/tests/auto/animation/animationutils/tst_animationutils.cpp b/tests/auto/animation/animationutils/tst_animationutils.cpp index 282ceb829..ac4fb6fa0 100644 --- a/tests/auto/animation/animationutils/tst_animationutils.cpp +++ b/tests/auto/animation/animationutils/tst_animationutils.cpp @@ -27,7 +27,7 @@ ****************************************************************************/ #include <QtTest/QTest> -#include <Qt3DAnimation/private/animationcliploader_p.h> +#include <Qt3DAnimation/private/animationclip_p.h> #include <Qt3DAnimation/private/animationutils_p.h> #include <Qt3DAnimation/private/blendedclipanimator_p.h> #include <Qt3DAnimation/private/channelmapper_p.h> @@ -51,7 +51,7 @@ using namespace Qt3DAnimation::Animation; Q_DECLARE_METATYPE(Qt3DAnimation::Animation::Handler*) Q_DECLARE_METATYPE(QVector<ChannelMapping *>) Q_DECLARE_METATYPE(ChannelMapper *) -Q_DECLARE_METATYPE(AnimationClipLoader *) +Q_DECLARE_METATYPE(AnimationClip *) Q_DECLARE_METATYPE(QVector<MappingData>) Q_DECLARE_METATYPE(QVector<Qt3DCore::QPropertyUpdatedChangePtr>) Q_DECLARE_METATYPE(Channel) @@ -157,13 +157,13 @@ public: return channelMapper; } - AnimationClipLoader *createAnimationClipLoader(Handler *handler, + AnimationClip *createAnimationClipLoader(Handler *handler, const QUrl &source) { auto clipId = Qt3DCore::QNodeId::createId(); - AnimationClipLoader *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId); + AnimationClip *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId); setPeerId(clip, clipId); - clip->setDataType(AnimationClipLoader::File); + clip->setDataType(AnimationClip::File); clip->setSource(source); clip->loadAnimation(); return clip; @@ -243,7 +243,7 @@ private Q_SLOTS: QTest::addColumn<Handler *>("handler"); QTest::addColumn<QVector<ChannelMapping *>>("channelMappings"); QTest::addColumn<ChannelMapper *>("channelMapper"); - QTest::addColumn<AnimationClipLoader *>("clip"); + QTest::addColumn<AnimationClip *>("clip"); QTest::addColumn<QVector<MappingData>>("expectedMappingData"); auto handler = new Handler; @@ -283,7 +283,7 @@ private Q_SLOTS: QFETCH(Handler *, handler); QFETCH(QVector<ChannelMapping *>, channelMappings); QFETCH(ChannelMapper *, channelMapper); - QFETCH(AnimationClipLoader *, clip); + QFETCH(AnimationClip *, clip); QFETCH(QVector<MappingData>, expectedMappingData); // WHEN @@ -1079,12 +1079,12 @@ private Q_SLOTS: void checkEvaluateClipAtLocalTime_data() { QTest::addColumn<Handler *>("handler"); - QTest::addColumn<AnimationClipLoader *>("clip"); + QTest::addColumn<AnimationClip *>("clip"); QTest::addColumn<float>("localTime"); QTest::addColumn<ClipResults>("expectedResults"); Handler *handler; - AnimationClipLoader *clip; + AnimationClip *clip; float localTime; ClipResults expectedResults; @@ -1163,7 +1163,7 @@ private Q_SLOTS: { // GIVEN QFETCH(Handler *, handler); - QFETCH(AnimationClipLoader *, clip); + QFETCH(AnimationClip *, clip); QFETCH(float, localTime); QFETCH(ClipResults, expectedResults); @@ -1186,12 +1186,12 @@ private Q_SLOTS: void checkEvaluateClipAtPhase_data() { QTest::addColumn<Handler *>("handler"); - QTest::addColumn<AnimationClipLoader *>("clip"); + QTest::addColumn<AnimationClip *>("clip"); QTest::addColumn<float>("phase"); QTest::addColumn<ClipResults>("expectedResults"); Handler *handler; - AnimationClipLoader *clip; + AnimationClip *clip; float phase; ClipResults expectedResults; @@ -1270,7 +1270,7 @@ private Q_SLOTS: { // GIVEN QFETCH(Handler *, handler); - QFETCH(AnimationClipLoader *, clip); + QFETCH(AnimationClip *, clip); QFETCH(float, phase); QFETCH(ClipResults, expectedResults); @@ -1580,12 +1580,12 @@ private Q_SLOTS: void checkEvaluationDataForClip_data() { QTest::addColumn<Handler *>("handler"); - QTest::addColumn<AnimationClipLoader *>("clip"); + QTest::addColumn<AnimationClip *>("clip"); QTest::addColumn<AnimatorEvaluationData>("animatorData"); QTest::addColumn<ClipEvaluationData>("expectedClipData"); Handler *handler; - AnimationClipLoader *clip; + AnimationClip *clip; AnimatorEvaluationData animatorData; ClipEvaluationData clipData; @@ -1678,7 +1678,7 @@ private Q_SLOTS: { // GIVEN QFETCH(Handler *, handler); - QFETCH(AnimationClipLoader *, clip); + QFETCH(AnimationClip *, clip); QFETCH(AnimatorEvaluationData, animatorData); QFETCH(ClipEvaluationData, expectedClipData); @@ -2349,7 +2349,7 @@ private Q_SLOTS: { QTest::addColumn<QVector<ChannelNameAndType>>("targetChannels"); QTest::addColumn<QVector<ComponentIndices>>("targetIndices"); - QTest::addColumn<AnimationClipLoader *>("clip"); + QTest::addColumn<AnimationClip *>("clip"); QTest::addColumn<ComponentIndices>("expectedResults"); { @@ -2367,8 +2367,8 @@ private Q_SLOTS: targetIndices.push_back({ 10 }); targetIndices.push_back({ 11 }); - auto *clip = new AnimationClipLoader(); - clip->setDataType(AnimationClipLoader::File); + auto *clip = new AnimationClip(); + clip->setDataType(AnimationClip::File); clip->setSource(QUrl("qrc:/clip3.json")); clip->loadAnimation(); @@ -2397,8 +2397,8 @@ private Q_SLOTS: targetIndices.push_back({ 10 }); targetIndices.push_back({ 11 }); - auto *clip = new AnimationClipLoader(); - clip->setDataType(AnimationClipLoader::File); + auto *clip = new AnimationClip(); + clip->setDataType(AnimationClip::File); clip->setSource(QUrl("qrc:/clip3.json")); clip->loadAnimation(); @@ -2427,8 +2427,8 @@ private Q_SLOTS: targetIndices.push_back({ 10 }); targetIndices.push_back({ 11 }); - auto *clip = new AnimationClipLoader(); - clip->setDataType(AnimationClipLoader::File); + auto *clip = new AnimationClip(); + clip->setDataType(AnimationClip::File); clip->setSource(QUrl("qrc:/clip3.json")); clip->loadAnimation(); @@ -2457,8 +2457,8 @@ private Q_SLOTS: targetIndices.push_back({ 10 }); targetIndices.push_back({ 11 }); - auto *clip = new AnimationClipLoader(); - clip->setDataType(AnimationClipLoader::File); + auto *clip = new AnimationClip(); + clip->setDataType(AnimationClip::File); clip->setSource(QUrl("qrc:/clip3.json")); clip->loadAnimation(); @@ -2478,7 +2478,7 @@ private Q_SLOTS: // GIVEN QFETCH(QVector<ChannelNameAndType>, targetChannels); QFETCH(QVector<ComponentIndices>, targetIndices); - QFETCH(AnimationClipLoader *, clip); + QFETCH(AnimationClip *, clip); QFETCH(ComponentIndices, expectedResults); // WHEN diff --git a/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp b/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp index eba5c600e..6fe2846b8 100644 --- a/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp +++ b/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp @@ -46,11 +46,11 @@ class tst_ClipBlendValue : public Qt3DCore::QBackendNodeTester { Q_OBJECT public: - AnimationClipLoader *createAnimationClipLoader(Handler *handler, + AnimationClip *createAnimationClipLoader(Handler *handler, double duration) { auto clipId = Qt3DCore::QNodeId::createId(); - AnimationClipLoader *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId); + AnimationClip *clip = handler->animationClipLoaderManager()->getOrCreateResource(clipId); setPeerId(clip, clipId); clip->setDuration(duration); return clip; diff --git a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp index 1177be72a..1ed4b8f13 100644 --- a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp +++ b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp @@ -31,7 +31,7 @@ #include <Qt3DAnimation/qanimationcliploader.h> #include <Qt3DAnimation/qchannelmapper.h> #include <Qt3DAnimation/qclipanimator.h> -#include <Qt3DAnimation/private/qanimationcliploader_p.h> +#include <Qt3DAnimation/private/qanimationclip_p.h> #include <Qt3DAnimation/private/qclipanimator_p.h> #include <Qt3DCore/qpropertyupdatedchange.h> #include <Qt3DCore/qnodecreatedchange.h> |