summaryrefslogtreecommitdiffstats
path: root/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp')
-rw-r--r--tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp b/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
index e75c4f2f8..732a87770 100644
--- a/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
+++ b/tests/auto/animation/lerpclipblend/tst_lerpclipblend.cpp
@@ -137,7 +137,7 @@ private Q_SLOTS:
{
// WHEN
LerpClipBlend backendLerpBlend;
- simulateInitialization(&lerpBlend, &backendLerpBlend);
+ simulateInitializationSync(&lerpBlend, &backendLerpBlend);
// THEN
QCOMPARE(backendLerpBlend.isEnabled(), true);
@@ -148,7 +148,7 @@ private Q_SLOTS:
// WHEN
LerpClipBlend backendLerpBlend;
lerpBlend.setEnabled(false);
- simulateInitialization(&lerpBlend, &backendLerpBlend);
+ simulateInitializationSync(&lerpBlend, &backendLerpBlend);
// THEN
QCOMPARE(backendLerpBlend.peerId(), lerpBlend.id());
@@ -159,27 +159,26 @@ private Q_SLOTS:
void checkSceneChangeEvents()
{
// GIVEN
+ Qt3DAnimation::QLerpClipBlend lerpBlend;
LerpClipBlend backendLerpBlend;
+ simulateInitializationSync(&lerpBlend, &backendLerpBlend);
+
{
- // WHEN
- const bool newValue = false;
- const auto change = Qt3DCore::QPropertyUpdatedChangePtr::create(Qt3DCore::QNodeId());
- change->setPropertyName("enabled");
- change->setValue(newValue);
- backendLerpBlend.sceneChangeEvent(change);
-
- // THEN
+ // WHEN
+ const bool newValue = false;
+ lerpBlend.setEnabled(newValue);
+ backendLerpBlend.syncFromFrontEnd(&lerpBlend, false);
+
+ // THEN
QCOMPARE(backendLerpBlend.isEnabled(), newValue);
}
{
- // WHEN
- const float newValue = 0.883f;
- const auto change = Qt3DCore::QPropertyUpdatedChangePtr::create(Qt3DCore::QNodeId());
- change->setPropertyName("blendFactor");
- change->setValue(QVariant::fromValue(newValue));
- backendLerpBlend.sceneChangeEvent(change);
-
- // THEN
+ // WHEN
+ const float newValue = 0.883f;
+ lerpBlend.setBlendFactor(newValue);
+ backendLerpBlend.syncFromFrontEnd(&lerpBlend, false);
+
+ // THEN
QCOMPARE(backendLerpBlend.blendFactor(), newValue);
}
}