diff options
Diffstat (limited to 'tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp')
-rw-r--r-- | tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp b/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp index d217f3b0f..591ff54ce 100644 --- a/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp +++ b/tests/auto/animation/qcallbackmapping/tst_qcallbackmapping.cpp @@ -185,23 +185,11 @@ private Q_SLOTS: QCoreApplication::processEvents(); // THEN - QCOMPARE(arbiter.events.size(), 3); - auto change = arbiter.events.at(0).staticCast<Qt3DCore::QPropertyUpdatedChange>(); - QCOMPARE(change->propertyName(), "type"); - QCOMPARE(change->type(), Qt3DCore::PropertyUpdated); - QCOMPARE(change->value().toInt(), int(QVariant::Vector3D)); - - change = arbiter.events.at(1).staticCast<Qt3DCore::QPropertyUpdatedChange>(); - QCOMPARE(change->propertyName(), "callback"); - QCOMPARE(change->type(), Qt3DCore::PropertyUpdated); - QCOMPARE(reinterpret_cast<DummyCallback *>(change->value().value<void *>()), callback); - - change = arbiter.events.at(2).staticCast<Qt3DCore::QPropertyUpdatedChange>(); - QCOMPARE(change->propertyName(), "callbackFlags"); - QCOMPARE(change->type(), Qt3DCore::PropertyUpdated); - QCOMPARE(change->value().toInt(), static_cast<int>(Qt3DAnimation::QAnimationCallback::OnThreadPool)); + QCOMPARE(arbiter.events.size(), 0); + QCOMPARE(arbiter.dirtyNodes.size(), 1); + QCOMPARE(arbiter.dirtyNodes.front(), &mapping); - arbiter.events.clear(); + arbiter.dirtyNodes.clear(); // WHEN mapping.setCallback(QVariant::Vector3D, callback, Qt3DAnimation::QAnimationCallback::OnThreadPool); @@ -209,6 +197,7 @@ private Q_SLOTS: // THEN QCOMPARE(arbiter.events.size(), 0); + QCOMPARE(arbiter.dirtyNodes.size(), 0); } } }; |