From de444194ed755200129db4b5d05aabf02591502e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 26 Jan 2017 20:41:58 +0100 Subject: [PATCH] Improve MoveResizeWindowTest::testMove expected fail cases Instead of having an expect fail on every check for the count of signals emitted for clientStepUserMovedResized we reset after the first one which is the actual issue. Thus we can properly check that in the other cases the signals are emitted. --- autotests/integration/move_resize_window_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 54023c7ab8..f147996fce 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -166,19 +166,19 @@ void MoveResizeWindowTest::testMove() QCOMPARE(Cursor::pos(), cursorPos + QPoint(8, 0)); QEXPECT_FAIL("", "First event is ignored", Continue); QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); + clientStepUserMovedResizedSpy.clear(); + windowStepUserMovedResizedSpy.clear(); c->keyPressEvent(Qt::Key_Right); c->updateMoveResize(Cursor::pos()); QCOMPARE(Cursor::pos(), cursorPos + QPoint(16, 0)); - QEXPECT_FAIL("", "First event is ignored", Continue); - QCOMPARE(clientStepUserMovedResizedSpy.count(), 2); - QEXPECT_FAIL("", "First event is ignored", Continue); - QCOMPARE(windowStepUserMovedResizedSpy.count(), 2); + QCOMPARE(clientStepUserMovedResizedSpy.count(), 1); + QCOMPARE(windowStepUserMovedResizedSpy.count(), 1); c->keyPressEvent(Qt::Key_Down | Qt::ALT); c->updateMoveResize(Cursor::pos()); - QEXPECT_FAIL("", "First event is ignored", Continue); - QCOMPARE(clientStepUserMovedResizedSpy.count(), 3); + QCOMPARE(clientStepUserMovedResizedSpy.count(), 2); + QCOMPARE(windowStepUserMovedResizedSpy.count(), 2); QCOMPARE(c->geometry(), QRect(16, 32, 100, 50)); QCOMPARE(Cursor::pos(), cursorPos + QPoint(16, 32));