From f19957bdb242fc2be3e0d78838f51071aa9fb0b7 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 22 Oct 2022 15:00:46 +0300 Subject: [PATCH] autotests: Fix testWaylandSeat in Qt 6 build --- .../autotests/client/test_wayland_seat.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/wayland/autotests/client/test_wayland_seat.cpp b/src/wayland/autotests/client/test_wayland_seat.cpp index cc1f52a9c0..8e1fdf8ef3 100644 --- a/src/wayland/autotests/client/test_wayland_seat.cpp +++ b/src/wayland/autotests/client/test_wayland_seat.cpp @@ -884,8 +884,10 @@ void TestWaylandSeat::testPointerSwipeGesture() spy = &endSpy; } QVERIFY(spy->wait()); - QTEST(endSpy.count(), "expectedEndCount"); - QTEST(cancelledSpy.count(), "expectedCancelCount"); + QFETCH(int, expectedEndCount); + QCOMPARE(endSpy.count(), expectedEndCount); + QFETCH(int, expectedCancelCount); + QCOMPARE(cancelledSpy.count(), expectedCancelCount); QCOMPARE(spy->count(), 1); QCOMPARE(spy->first().at(0).value(), m_display->serial()); QCOMPARE(spy->first().at(1).value(), 4u); @@ -1007,8 +1009,10 @@ void TestWaylandSeat::testPointerPinchGesture() spy = &endSpy; } QVERIFY(spy->wait()); - QTEST(endSpy.count(), "expectedEndCount"); - QTEST(cancelledSpy.count(), "expectedCancelCount"); + QFETCH(int, expectedEndCount); + QCOMPARE(endSpy.count(), expectedEndCount); + QFETCH(int, expectedCancelCount); + QCOMPARE(cancelledSpy.count(), expectedCancelCount); QCOMPARE(spy->count(), 1); QCOMPARE(spy->first().at(0).value(), m_display->serial()); QCOMPARE(spy->first().at(1).value(), 4u); @@ -1134,8 +1138,10 @@ void TestWaylandSeat::testPointerHoldGesture() spy = &endSpy; } QVERIFY(spy->wait()); - QTEST(endSpy.count(), "expectedEndCount"); - QTEST(cancelledSpy.count(), "expectedCancelCount"); + QFETCH(int, expectedEndCount); + QCOMPARE(endSpy.count(), expectedEndCount); + QFETCH(int, expectedCancelCount); + QCOMPARE(cancelledSpy.count(), expectedCancelCount); QCOMPARE(spy->count(), 1); QCOMPARE(spy->first().at(0).value(), m_display->serial()); QCOMPARE(spy->first().at(1).value(), 2);