qt5base-lts/tests/auto/corelib/kernel/qtimer
Kari Oikarinen 1049d3f9db tst_QTimer: Replace unconditional qWait()s with QSignalSpy
Where possible. Sometimes the replacement is QTRY_COMPARE instead.

Also don't use QTestEventLoop directly when it can also be replaced with
QSignalSpy use.

Remove the TimerHelper class, since its uses can be done with QSignalSpy (and a
lambda when remainingTime is checked). Although checking static single-shot
timers still needs a target object, so use a stripped down version in those
tests.

remainingTimeDuringActivation() was not actually testing the repeating case, but
single-shot case twice, so fix that. In the repeating case the remaining time is
exactly 20 ms on my machine, but QEMU emulation seems to be slow enough for time
to advance before the lambda is executed, so relax the conditions.

Task-number: QTBUG-63992
Change-Id: Iae92ff7862a13d36e695eec63b54403ec872f2b4
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-06-26 05:51:15 +00:00
..
.gitignore Moving relevant tests to corelib/kernel 2011-09-01 12:42:14 +02:00
BLACKLIST Blacklist tst_QTimer::basic_chrono on macOS 2017-06-01 07:27:59 +00:00
qtimer.pro Clean up OS version checks for Apple platforms 2017-09-29 03:30:13 +00:00
tst_qtimer.cpp tst_QTimer: Replace unconditional qWait()s with QSignalSpy 2018-06-26 05:51:15 +00:00