summaryrefslogtreecommitdiffstats
path: root/tests/auto/input
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2019-10-07 17:40:30 +0100
committerMike Krus <mike.krus@kdab.com>2019-10-11 07:22:55 +0100
commit4fde5ac2ee2f1a179b5591b19a20e611a486de2d (patch)
treec3c64a43cc91e81ebbe1d1c5ffe74de5d14f2394 /tests/auto/input
parent6af2f62e003833c788640a6e493865cfbbab03a3 (diff)
Update AxisAccumulatorJob to use direct sync
Change-Id: I4e64fa9f94dad1392b80851c2a6d8d4e013147f7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/input')
-rw-r--r--tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp52
-rw-r--r--tests/auto/input/qaxisaccumulator/tst_qaxisaccumulator.cpp27
2 files changed, 0 insertions, 79 deletions
diff --git a/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp b/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp
index f04282037..f7d7d32f1 100644
--- a/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp
+++ b/tests/auto/input/axisaccumulator/tst_axisaccumulator.cpp
@@ -143,58 +143,6 @@ private Q_SLOTS:
QCOMPARE(backendAxisAccumulator.scale(), 3.0f);
}
- void checkValuePropertyBackendNotification()
- {
- // GIVEN
- TestArbiter arbiter;
- Qt3DInput::Input::AxisAccumulator backendAxisAccumulator;
- backendAxisAccumulator.setEnabled(true);
- Qt3DCore::QBackendNodePrivate::get(&backendAxisAccumulator)->setArbiter(&arbiter);
-
- // WHEN
- backendAxisAccumulator.setValue(454.0f);
-
- // THEN
- QCOMPARE(backendAxisAccumulator.value(), 454.0f);
- QCOMPARE(arbiter.events.count(), 1);
- Qt3DCore::QPropertyUpdatedChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(change->propertyName(), "value");
- QCOMPARE(change->value().toFloat(), backendAxisAccumulator.value());
-
- arbiter.events.clear();
-
- // WHEN
- backendAxisAccumulator.setValue(454.0f);
-
- // THEN
- QCOMPARE(backendAxisAccumulator.value(), 454.0f);
- QCOMPARE(arbiter.events.count(), 0);
-
- arbiter.events.clear();
-
-
- // WHEN
- backendAxisAccumulator.setVelocity(383.0f);
-
- // THEN
- QCOMPARE(backendAxisAccumulator.velocity(), 383.0f);
- QCOMPARE(arbiter.events.count(), 1);
- Qt3DCore::QPropertyUpdatedChangePtr velocityChange = arbiter.events.first().staticCast<Qt3DCore::QPropertyUpdatedChange>();
- QCOMPARE(velocityChange->propertyName(), "velocity");
- QCOMPARE(velocityChange->value().toFloat(), backendAxisAccumulator.velocity());
-
- arbiter.events.clear();
-
- // WHEN
- backendAxisAccumulator.setVelocity(383.0f);
-
- // THEN
- QCOMPARE(backendAxisAccumulator.velocity(), 383.0f);
- QCOMPARE(arbiter.events.count(), 0);
-
- arbiter.events.clear();
- }
-
void shouldNotChangeValueWhenDisabled()
{
// GIVEN
diff --git a/tests/auto/input/qaxisaccumulator/tst_qaxisaccumulator.cpp b/tests/auto/input/qaxisaccumulator/tst_qaxisaccumulator.cpp
index b206e17cc..e4145ab7a 100644
--- a/tests/auto/input/qaxisaccumulator/tst_qaxisaccumulator.cpp
+++ b/tests/auto/input/qaxisaccumulator/tst_qaxisaccumulator.cpp
@@ -155,33 +155,6 @@ private Q_SLOTS:
arbiter.dirtyNodes.clear();
}
- void checkValuePropertyChanged()
- {
- // GIVEN
- QCOMPARE(value(), 0.0f);
-
- // Note: simulate backend change to frontend
- // WHEN
- Qt3DCore::QPropertyUpdatedChangePtr valueChange(new Qt3DCore::QPropertyUpdatedChange(Qt3DCore::QNodeId()));
- valueChange->setPropertyName("value");
- valueChange->setValue(383.0f);
- sceneChangeEvent(valueChange);
-
- // THEN
- QCOMPARE(value(), 383.0f);
- QCOMPARE(velocity(), 0.0f);
-
- // WHEN
- valueChange = QSharedPointer<Qt3DCore::QPropertyUpdatedChange>::create(Qt3DCore::QNodeId());
- valueChange->setPropertyName("velocity");
- valueChange->setValue(123.0f);
- sceneChangeEvent(valueChange);
-
- // THEN
- QCOMPARE(value(), 383.0f);
- QCOMPARE(velocity(), 123.0f);
- }
-
void checkAxisInputBookkeeping()
{
// GIVEN