summaryrefslogtreecommitdiffstats
path: root/tests/auto/animation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/animation')
-rw-r--r--tests/auto/animation/qadditiveclipblend/tst_qadditiveclipblend.cpp42
-rw-r--r--tests/auto/animation/qanimationcliploader/tst_qanimationcliploader.cpp12
-rw-r--r--tests/auto/animation/qblendedclipanimator/tst_qblendedclipanimator.cpp65
-rw-r--r--tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp13
-rw-r--r--tests/auto/animation/qchannelmapper/tst_qchannelmapper.cpp10
-rw-r--r--tests/auto/animation/qchannelmapping/tst_qchannelmapping.cpp62
-rw-r--r--tests/auto/animation/qclipanimator/tst_qclipanimator.cpp52
-rw-r--r--tests/auto/animation/qclipblendvalue/tst_qclipblendvalue.cpp13
-rw-r--r--tests/auto/animation/qclock/tst_qclock.cpp15
-rw-r--r--tests/auto/animation/qlerpclipblend/tst_qlerpclipblend.cpp39
-rw-r--r--tests/auto/animation/qskeletonmapping/tst_qskeletonmapping.cpp13
11 files changed, 110 insertions, 226 deletions
diff --git a/tests/auto/animation/qadditiveclipblend/tst_qadditiveclipblend.cpp b/tests/auto/animation/qadditiveclipblend/tst_qadditiveclipblend.cpp
index c1f01394f..2df135969 100644
--- a/tests/auto/animation/qadditiveclipblend/tst_qadditiveclipblend.cpp
+++ b/tests/auto/animation/qadditiveclipblend/tst_qadditiveclipblend.cpp
@@ -197,25 +197,22 @@ private Q_SLOTS:
{
// WHEN
addBlend.setAdditiveFactor(0.4f);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "additiveFactor");
- QCOMPARE(change->value().value<float>(), addBlend.additiveFactor());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &addBlend);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
addBlend.setAdditiveFactor(0.4f);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -231,25 +228,22 @@ private Q_SLOTS:
{
// WHEN
addBlend.setBaseClip(baseClip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "baseClip");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), addBlend.baseClip()->id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &addBlend);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
addBlend.setBaseClip(baseClip);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -264,25 +258,21 @@ private Q_SLOTS:
{
// WHEN
addBlend.setAdditiveClip(additiveClip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "additiveClip");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), addBlend.additiveClip()->id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
-
- arbiter.events.clear();
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &addBlend);
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
addBlend.setAdditiveClip(additiveClip);
- QCoreApplication::processEvents();
- // THEN
+ //
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qanimationcliploader/tst_qanimationcliploader.cpp b/tests/auto/animation/qanimationcliploader/tst_qanimationcliploader.cpp
index 968ad8764..f446f1b0f 100644
--- a/tests/auto/animation/qanimationcliploader/tst_qanimationcliploader.cpp
+++ b/tests/auto/animation/qanimationcliploader/tst_qanimationcliploader.cpp
@@ -139,24 +139,22 @@ private Q_SLOTS:
{
// WHEN
clip.setSource(QUrl(QStringLiteral("qrc:/toyplane.qlip")));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "source");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &clip);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
clip.setSource(QStringLiteral("qrc:/toyplane.qlip"));
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qblendedclipanimator/tst_qblendedclipanimator.cpp b/tests/auto/animation/qblendedclipanimator/tst_qblendedclipanimator.cpp
index 56be94472..267ff03cb 100644
--- a/tests/auto/animation/qblendedclipanimator/tst_qblendedclipanimator.cpp
+++ b/tests/auto/animation/qblendedclipanimator/tst_qblendedclipanimator.cpp
@@ -261,25 +261,22 @@ private Q_SLOTS:
{
// WHEN
blendedClipAnimator.setBlendTree(&blendRoot);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "blendTree");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), blendRoot.id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &blendedClipAnimator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
blendedClipAnimator.setBlendTree(&blendRoot);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -312,25 +309,22 @@ private Q_SLOTS:
{
// WHEN
blendedClipAnimator.setChannelMapper(&channelMapper);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "channelMapper");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), channelMapper.id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &blendedClipAnimator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
blendedClipAnimator.setChannelMapper(&channelMapper);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -362,25 +356,22 @@ private Q_SLOTS:
{
// WHEN
blendedClipAnimator.setRunning(true);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "running");
- QCOMPARE(change->value().value<bool>(), blendedClipAnimator.isRunning());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &blendedClipAnimator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
blendedClipAnimator.setRunning(true);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -395,25 +386,22 @@ private Q_SLOTS:
{
// WHEN
blendedClipAnimator.setLoopCount(1584);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "loops");
- QCOMPARE(change->value().value<int>(), blendedClipAnimator.loopCount());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &blendedClipAnimator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
blendedClipAnimator.setLoopCount(1584);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -428,25 +416,22 @@ private Q_SLOTS:
{
// WHEN
blendedClipAnimator.setNormalizedTime(0.5f);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "normalizedTime");
- QCOMPARE(change->value().value<float>(), blendedClipAnimator.normalizedTime());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &blendedClipAnimator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
blendedClipAnimator.setNormalizedTime(0.5f);
- QCoreApplication::processEvents();
// THEN
QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp b/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp
index 78dff8b64..d217f3b0f 100644
--- a/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp
+++ b/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp
@@ -164,23 +164,18 @@ private Q_SLOTS:
{
// WHEN
mapping.setChannelName(QStringLiteral("Scale"));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "channelName");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().toString(), mapping.channelName());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &mapping);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
// WHEN
mapping.setChannelName(QStringLiteral("Scale"));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
{
diff --git a/tests/auto/animation/qchannelmapper/tst_qchannelmapper.cpp b/tests/auto/animation/qchannelmapper/tst_qchannelmapper.cpp
index bbc27fa41..e5a82e4c7 100644
--- a/tests/auto/animation/qchannelmapper/tst_qchannelmapper.cpp
+++ b/tests/auto/animation/qchannelmapper/tst_qchannelmapper.cpp
@@ -102,16 +102,12 @@ private Q_SLOTS:
// WHEN
mapper->setEnabled(false);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- Qt3DCore::QPropertyUpdatedChangePtr propertyChange = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(propertyChange->propertyName(), "enabled");
- QCOMPARE(propertyChange->value().toBool(), mapper->isEnabled());
- QCOMPARE(propertyChange->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), mapper.data());
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
void checkMappingBookkeeping()
diff --git a/tests/auto/animation/qchannelmapping/tst_qchannelmapping.cpp b/tests/auto/animation/qchannelmapping/tst_qchannelmapping.cpp
index a6e4e5eb8..37bd3e241 100644
--- a/tests/auto/animation/qchannelmapping/tst_qchannelmapping.cpp
+++ b/tests/auto/animation/qchannelmapping/tst_qchannelmapping.cpp
@@ -246,45 +246,35 @@ private Q_SLOTS:
{
// WHEN
mapping.setChannelName(QStringLiteral("Scale"));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "channelName");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().toString(), mapping.channelName());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &mapping);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
// WHEN
mapping.setChannelName(QStringLiteral("Scale"));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
{
// WHEN
mapping.setTarget(target.data());
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "target");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), mapping.target()->id());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &mapping);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
// WHEN
mapping.setTarget(target.data());
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
{
@@ -350,6 +340,9 @@ private Q_SLOTS:
QFETCH(int, expectedType);
QFETCH(int, expectedComponentCount);
+ Q_UNUSED(expectedType);
+ Q_UNUSED(expectedComponentCount);
+
TestArbiter arbiter;
Qt3DAnimation::QChannelMapping mapping;
QScopedPointer<Qt3DCore::QEntity> target(new tst_QTargetEntity());
@@ -359,41 +352,18 @@ private Q_SLOTS:
{
// WHEN
target->setProperty(propertyName.constData(), value);
- mapping.setProperty(QString::fromLatin1(propertyName));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 4);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), target.data());
- // Automatic notification change when property is updated
- auto change = arbiter.events.takeFirst().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), propertyName.constData());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value(), value);
+ arbiter.dirtyNodes.clear();
- change = arbiter.events.takeFirst().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "type");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().toInt(), expectedType);
-
- change = arbiter.events.takeFirst().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "componentCount");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().toInt(), expectedComponentCount);
-
- change = arbiter.events.takeFirst().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "propertyName");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QVERIFY(qstrcmp(reinterpret_cast<const char *>(change->value().value<void *>()), propertyName.constData()) == 0);
-
- arbiter.events.clear();
-
- // WHEN
+ // THEN
mapping.setProperty(QString::fromLatin1(propertyName));
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
index 0b28228d9..711653819 100644
--- a/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
+++ b/tests/auto/animation/qclipanimator/tst_qclipanimator.cpp
@@ -248,25 +248,20 @@ private Q_SLOTS:
{
// WHEN
animator.setClip(clip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "clip");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), clip->id());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &animator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
animator.setClip(clip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
// GIVEN
@@ -274,25 +269,20 @@ private Q_SLOTS:
{
// WHEN
animator.setChannelMapper(mapper);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "channelMapper");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), mapper->id());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &animator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
animator.setChannelMapper(mapper);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
// GIVEN
@@ -300,49 +290,39 @@ private Q_SLOTS:
{
// WHEN
animator.setClock(clock);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "clock");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), clock->id());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &animator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
animator.setClock(clock);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
{
// WHEN
animator.setLoopCount(10);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "loops");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().toInt(), animator.loopCount());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &animator);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
animator.setLoopCount(10);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qclipblendvalue/tst_qclipblendvalue.cpp b/tests/auto/animation/qclipblendvalue/tst_qclipblendvalue.cpp
index bdbee9380..de1e13a33 100644
--- a/tests/auto/animation/qclipblendvalue/tst_qclipblendvalue.cpp
+++ b/tests/auto/animation/qclipblendvalue/tst_qclipblendvalue.cpp
@@ -148,25 +148,20 @@ private Q_SLOTS:
{
// WHEN
clipBlendNode.setClip(clip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "clip");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), clipBlendNode.clip()->id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &clipBlendNode);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
clipBlendNode.setClip(clip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qclock/tst_qclock.cpp b/tests/auto/animation/qclock/tst_qclock.cpp
index 34c70da7b..b6050ade7 100644
--- a/tests/auto/animation/qclock/tst_qclock.cpp
+++ b/tests/auto/animation/qclock/tst_qclock.cpp
@@ -136,26 +136,21 @@ private Q_SLOTS:
{
// WHEN
- clock.setPlaybackRate(10.5);
- QCoreApplication::processEvents();
+ clock.setPlaybackRate(10.5f);
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "playbackRate");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().value<double>(), clock.playbackRate());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &clock);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
clock.setPlaybackRate(10.5f);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
};
diff --git a/tests/auto/animation/qlerpclipblend/tst_qlerpclipblend.cpp b/tests/auto/animation/qlerpclipblend/tst_qlerpclipblend.cpp
index 057f37786..1f7b646b4 100644
--- a/tests/auto/animation/qlerpclipblend/tst_qlerpclipblend.cpp
+++ b/tests/auto/animation/qlerpclipblend/tst_qlerpclipblend.cpp
@@ -197,25 +197,20 @@ private Q_SLOTS:
{
// WHEN
lerpBlend.setBlendFactor(0.4f);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "blendFactor");
- QCOMPARE(change->value().value<float>(), lerpBlend.blendFactor());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &lerpBlend);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
lerpBlend.setBlendFactor(0.4f);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -231,25 +226,20 @@ private Q_SLOTS:
{
// WHEN
lerpBlend.setStartClip(startClip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "startClip");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), lerpBlend.startClip()->id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &lerpBlend);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
lerpBlend.setStartClip(startClip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
@@ -264,25 +254,20 @@ private Q_SLOTS:
{
// WHEN
lerpBlend.setEndClip(endClip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "endClip");
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), lerpBlend.endClip()->id());
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &lerpBlend);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
}
{
// WHEN
lerpBlend.setEndClip(endClip);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
diff --git a/tests/auto/animation/qskeletonmapping/tst_qskeletonmapping.cpp b/tests/auto/animation/qskeletonmapping/tst_qskeletonmapping.cpp
index 452292e9e..843af441e 100644
--- a/tests/auto/animation/qskeletonmapping/tst_qskeletonmapping.cpp
+++ b/tests/auto/animation/qskeletonmapping/tst_qskeletonmapping.cpp
@@ -149,23 +149,18 @@ private Q_SLOTS:
// WHEN
auto target = new Qt3DCore::QSkeleton();
mapping.setSkeleton(target);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 1);
- auto change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "skeleton");
- QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
- QCOMPARE(change->value().value<Qt3DCore::QNodeId>(), mapping.skeleton()->id());
+ QCOMPARE(arbiter.dirtyNodes.size(), 1);
+ QCOMPARE(arbiter.dirtyNodes.front(), &mapping);
- arbiter.events.clear();
+ arbiter.dirtyNodes.clear();
// WHEN
mapping.setSkeleton(target);
- QCoreApplication::processEvents();
// THEN
- QCOMPARE(arbiter.events.size(), 0);
+ QCOMPARE(arbiter.dirtyNodes.size(), 0);
}
}
};