summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-03-04 16:54:10 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-03-17 08:37:37 +0000
commitfd39bbaca2fe8e29bb9b603340ed94c7480b6da5 (patch)
tree97e71026934d503b1114e4314a2d4cc5abb3c2b9 /tests
parent8256e82d72f17721fb40428df6c7ba397b3e7edd (diff)
Add using namespace Qt3DAnimation::Animation to some backend tests
Reduces visual clutter. Change-Id: I244fdbab32d6f8fb77d5f9bd364fa1f9c8c7ec2c Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/animation/additiveclipblend/tst_additiveclipblend.cpp16
-rw-r--r--tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp14
-rw-r--r--tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp16
3 files changed, 26 insertions, 20 deletions
diff --git a/tests/auto/animation/additiveclipblend/tst_additiveclipblend.cpp b/tests/auto/animation/additiveclipblend/tst_additiveclipblend.cpp
index bdae53ee3..2cc707fa5 100644
--- a/tests/auto/animation/additiveclipblend/tst_additiveclipblend.cpp
+++ b/tests/auto/animation/additiveclipblend/tst_additiveclipblend.cpp
@@ -35,6 +35,8 @@
#include <Qt3DCore/qpropertyupdatedchange.h>
#include "qbackendnodetester.h"
+using namespace Qt3DAnimation::Animation;
+
class tst_AdditiveClipBlend : public Qt3DCore::QBackendNodeTester
{
Q_OBJECT
@@ -44,7 +46,7 @@ private Q_SLOTS:
void checkInitialState()
{
// GIVEN
- Qt3DAnimation::Animation::AdditiveClipBlend backendAdditiveBlend;
+ AdditiveClipBlend backendAdditiveBlend;
// THEN
QCOMPARE(backendAdditiveBlend.isEnabled(), false);
@@ -52,7 +54,7 @@ private Q_SLOTS:
QCOMPARE(backendAdditiveBlend.baseClipId(), Qt3DCore::QNodeId());
QCOMPARE(backendAdditiveBlend.additiveClipId(), Qt3DCore::QNodeId());
QCOMPARE(backendAdditiveBlend.additiveFactor(), 0.0f);
- QCOMPARE(backendAdditiveBlend.blendType(), Qt3DAnimation::Animation::ClipBlendNode::AdditiveBlendType);
+ QCOMPARE(backendAdditiveBlend.blendType(), ClipBlendNode::AdditiveBlendType);
}
void checkInitializeFromPeer()
@@ -69,7 +71,7 @@ private Q_SLOTS:
{
// WHEN
- Qt3DAnimation::Animation::AdditiveClipBlend backendAdditiveBlend;
+ AdditiveClipBlend backendAdditiveBlend;
simulateInitialization(&additiveBlend, &backendAdditiveBlend);
// THEN
@@ -83,7 +85,7 @@ private Q_SLOTS:
}
{
// WHEN
- Qt3DAnimation::Animation::AdditiveClipBlend backendAdditiveBlend;
+ AdditiveClipBlend backendAdditiveBlend;
additiveBlend.setEnabled(false);
simulateInitialization(&additiveBlend, &backendAdditiveBlend);
@@ -96,7 +98,7 @@ private Q_SLOTS:
void checkSceneChangeEvents()
{
// GIVEN
- Qt3DAnimation::Animation::AdditiveClipBlend backendAdditiveBlend;
+ AdditiveClipBlend backendAdditiveBlend;
{
// WHEN
const bool newValue = false;
@@ -162,7 +164,7 @@ private Q_SLOTS:
QFETCH(float, value2);
QFETCH(float, blendFactor);
QFETCH(float, result);
- Qt3DAnimation::Animation::AdditiveClipBlend addBlend;
+ AdditiveClipBlend addBlend;
// WHEN
addBlend.setAdditiveFactor(blendFactor);
@@ -175,7 +177,7 @@ private Q_SLOTS:
void checkDependencyIds()
{
// GIVEN
- Qt3DAnimation::Animation::AdditiveClipBlend addBlend;
+ AdditiveClipBlend addBlend;
auto baseClipId = Qt3DCore::QNodeId::createId();
auto additiveClipId = Qt3DCore::QNodeId::createId();
diff --git a/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp b/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp
index 48b0f6931..c23d98672 100644
--- a/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp
+++ b/tests/auto/animation/clipblendvalue/tst_clipblendvalue.cpp
@@ -35,6 +35,8 @@
#include <Qt3DCore/qpropertyupdatedchange.h>
#include "qbackendnodetester.h"
+using namespace Qt3DAnimation::Animation;
+
class tst_ClipBlendValue : public Qt3DCore::QBackendNodeTester
{
Q_OBJECT
@@ -43,13 +45,13 @@ private Q_SLOTS:
void checkInitialState()
{
// GIVEN
- Qt3DAnimation::Animation::ClipBlendValue backendClipBlendValue;
+ ClipBlendValue backendClipBlendValue;
// THEN
QCOMPARE(backendClipBlendValue.isEnabled(), false);
QVERIFY(backendClipBlendValue.peerId().isNull());
QCOMPARE(backendClipBlendValue.clipId(), Qt3DCore::QNodeId());
- QCOMPARE(backendClipBlendValue.blendType(), Qt3DAnimation::Animation::ClipBlendNode::ValueType);
+ QCOMPARE(backendClipBlendValue.blendType(), ClipBlendNode::ValueType);
}
void checkInitializeFromPeer()
@@ -61,7 +63,7 @@ private Q_SLOTS:
{
// WHEN
- Qt3DAnimation::Animation::ClipBlendValue backendClipBlendValue;
+ ClipBlendValue backendClipBlendValue;
simulateInitialization(&clipBlendValue, &backendClipBlendValue);
// THEN
@@ -71,7 +73,7 @@ private Q_SLOTS:
}
{
// WHEN
- Qt3DAnimation::Animation::ClipBlendValue backendClipBlendValue;
+ ClipBlendValue backendClipBlendValue;
clipBlendValue.setEnabled(false);
simulateInitialization(&clipBlendValue, &backendClipBlendValue);
@@ -84,7 +86,7 @@ private Q_SLOTS:
void checkSceneChangeEvents()
{
// GIVEN
- Qt3DAnimation::Animation::ClipBlendValue backendClipBlendValue;
+ ClipBlendValue backendClipBlendValue;
{
// WHEN
const bool newValue = false;
@@ -112,7 +114,7 @@ private Q_SLOTS:
void checkDependencyIds()
{
// GIVEN
- Qt3DAnimation::Animation::ClipBlendValue clipNode;
+ ClipBlendValue clipNode;
auto clipId = Qt3DCore::QNodeId::createId();
// WHEN
diff --git a/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp b/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
index 160049da7..34c52ff53 100644
--- a/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
+++ b/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
@@ -35,6 +35,8 @@
#include <Qt3DCore/qpropertyupdatedchange.h>
#include "qbackendnodetester.h"
+using namespace Qt3DAnimation::Animation;
+
class tst_LerpClipBlend : public Qt3DCore::QBackendNodeTester
{
Q_OBJECT
@@ -44,13 +46,13 @@ private Q_SLOTS:
void checkInitialState()
{
// GIVEN
- Qt3DAnimation::Animation::LerpClipBlend backendLerpBlend;
+ LerpClipBlend backendLerpBlend;
// THEN
QCOMPARE(backendLerpBlend.isEnabled(), false);
QVERIFY(backendLerpBlend.peerId().isNull());
QCOMPARE(backendLerpBlend.blendFactor(), 0.0f);
- QCOMPARE(backendLerpBlend.blendType(), Qt3DAnimation::Animation::ClipBlendNode::LerpBlendType);
+ QCOMPARE(backendLerpBlend.blendType(), ClipBlendNode::LerpBlendType);
}
void checkInitializeFromPeer()
@@ -63,7 +65,7 @@ private Q_SLOTS:
{
// WHEN
- Qt3DAnimation::Animation::LerpClipBlend backendLerpBlend;
+ LerpClipBlend backendLerpBlend;
simulateInitialization(&lerpBlend, &backendLerpBlend);
// THEN
@@ -75,7 +77,7 @@ private Q_SLOTS:
}
{
// WHEN
- Qt3DAnimation::Animation::LerpClipBlend backendLerpBlend;
+ LerpClipBlend backendLerpBlend;
lerpBlend.setEnabled(false);
simulateInitialization(&lerpBlend, &backendLerpBlend);
@@ -88,7 +90,7 @@ private Q_SLOTS:
void checkSceneChangeEvents()
{
// GIVEN
- Qt3DAnimation::Animation::LerpClipBlend backendLerpBlend;
+ LerpClipBlend backendLerpBlend;
{
// WHEN
const bool newValue = false;
@@ -132,7 +134,7 @@ private Q_SLOTS:
QFETCH(float, value2);
QFETCH(float, blendFactor);
QFETCH(float, result);
- Qt3DAnimation::Animation::LerpClipBlend lerpBlend;
+ LerpClipBlend lerpBlend;
// WHEN
lerpBlend.setBlendFactor(blendFactor);
@@ -145,7 +147,7 @@ private Q_SLOTS:
void checkDependencyIds()
{
// GIVEN
- Qt3DAnimation::Animation::LerpClipBlend lerpBlend;
+ LerpClipBlend lerpBlend;
auto startClipId = Qt3DCore::QNodeId::createId();
auto endClipId = Qt3DCore::QNodeId::createId();