autotests: Fix testWaylandSeat in Qt 6 build

master
Vlad Zahorodnii 2 years ago
parent e665c1c80a
commit f19957bdb2

@ -884,8 +884,10 @@ void TestWaylandSeat::testPointerSwipeGesture()
spy = &endSpy; spy = &endSpy;
} }
QVERIFY(spy->wait()); QVERIFY(spy->wait());
QTEST(endSpy.count(), "expectedEndCount"); QFETCH(int, expectedEndCount);
QTEST(cancelledSpy.count(), "expectedCancelCount"); QCOMPARE(endSpy.count(), expectedEndCount);
QFETCH(int, expectedCancelCount);
QCOMPARE(cancelledSpy.count(), expectedCancelCount);
QCOMPARE(spy->count(), 1); QCOMPARE(spy->count(), 1);
QCOMPARE(spy->first().at(0).value<quint32>(), m_display->serial()); QCOMPARE(spy->first().at(0).value<quint32>(), m_display->serial());
QCOMPARE(spy->first().at(1).value<quint32>(), 4u); QCOMPARE(spy->first().at(1).value<quint32>(), 4u);
@ -1007,8 +1009,10 @@ void TestWaylandSeat::testPointerPinchGesture()
spy = &endSpy; spy = &endSpy;
} }
QVERIFY(spy->wait()); QVERIFY(spy->wait());
QTEST(endSpy.count(), "expectedEndCount"); QFETCH(int, expectedEndCount);
QTEST(cancelledSpy.count(), "expectedCancelCount"); QCOMPARE(endSpy.count(), expectedEndCount);
QFETCH(int, expectedCancelCount);
QCOMPARE(cancelledSpy.count(), expectedCancelCount);
QCOMPARE(spy->count(), 1); QCOMPARE(spy->count(), 1);
QCOMPARE(spy->first().at(0).value<quint32>(), m_display->serial()); QCOMPARE(spy->first().at(0).value<quint32>(), m_display->serial());
QCOMPARE(spy->first().at(1).value<quint32>(), 4u); QCOMPARE(spy->first().at(1).value<quint32>(), 4u);
@ -1134,8 +1138,10 @@ void TestWaylandSeat::testPointerHoldGesture()
spy = &endSpy; spy = &endSpy;
} }
QVERIFY(spy->wait()); QVERIFY(spy->wait());
QTEST(endSpy.count(), "expectedEndCount"); QFETCH(int, expectedEndCount);
QTEST(cancelledSpy.count(), "expectedCancelCount"); QCOMPARE(endSpy.count(), expectedEndCount);
QFETCH(int, expectedCancelCount);
QCOMPARE(cancelledSpy.count(), expectedCancelCount);
QCOMPARE(spy->count(), 1); QCOMPARE(spy->count(), 1);
QCOMPARE(spy->first().at(0).value<quint32>(), m_display->serial()); QCOMPARE(spy->first().at(0).value<quint32>(), m_display->serial());
QCOMPARE(spy->first().at(1).value<quint32>(), 2); QCOMPARE(spy->first().at(1).value<quint32>(), 2);

Loading…
Cancel
Save