qt5base-lts/tests/auto/testlib/selftests/expected_mouse.txt
Shawn Rutledge 0f94430a0f testlib: make it possible to test double-clicks with discrete events
The timestamp will no longer be incremented by 500ms after a mouse
release if the delay has been explicitly specified.

The default delay is 1 ms since f5010c49a3
but the running timestamp was unconditionally post-incremented by 500ms
after every mouse release, to prevent double-clicks, which were always
deemed as unintended (because we have a mouseDClick function for that).
Now, we do that 500ms increment only if the user has not provided a
delay value in the function argument at all. We have often found it
useful in our own tests to generate double-clicks "the hard way", by
sending indivdual events, so as to be able to check state in some target
object at each step, as shown in the new snippet.

[ChangeLog][QtTest] QTest::mouseRelease() and mouseClick() can now be
used to test double-clicks, by specifying a realistic timestamp delay.

Fixes: QTBUG-102441
Change-Id: I8e8d242061f79efb4c6e02638645e03661a9cd92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-10-16 08:36:03 +02:00

22 lines
1.2 KiB
Plaintext

********* Start testing of tst_Mouse *********
Config: Using QtTest library
PASS : tst_Mouse::initTestCase()
PASS : tst_Mouse::timestampBetweenTestFunction(press, release)
PASS : tst_Mouse::timestampBetweenTestFunction(press, release, hover)
PASS : tst_Mouse::timestampBetweenTestFunction(hover)
PASS : tst_Mouse::timestampBetweenTestFunction(hover #2)
PASS : tst_Mouse::timestampBetweenTestFunction(press, release #2)
PASS : tst_Mouse::timestampBetweenTestFunction(press, release, hover #2)
PASS : tst_Mouse::stateHandlingPart1(dummy-1)
PASS : tst_Mouse::stateHandlingPart1(dummy-2)
SKIP : tst_Mouse::stateHandlingPart2() Not implemented beyond this point!
Loc: [qtbase/tests/auto/testlib/selftests/mouse/tst_mouse.cpp(0)]
SKIP : tst_Mouse::deterministicEvents(first-run-true) Not implemented!
Loc: [qtbase/tests/auto/testlib/selftests/mouse/tst_mouse.cpp(0)]
SKIP : tst_Mouse::deterministicEvents(first-run-false) Not implemented!
Loc: [qtbase/tests/auto/testlib/selftests/mouse/tst_mouse.cpp(0)]
PASS : tst_Mouse::doubleClick()
PASS : tst_Mouse::cleanupTestCase()
Totals: 11 passed, 0 failed, 3 skipped, 0 blacklisted, 0ms
********* Finished testing of tst_Mouse *********