diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-28 12:33:35 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-02-28 15:15:42 +0100 |
commit | 4a1de178c9cc891560f38d64d89074799b0fa0e1 (patch) | |
tree | 6b0a4320a67b5af458f15219c829d4d7b3bd6adf /tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | |
parent | 08d5059320334223ff1f9009342324f25c231f0b (diff) |
Try again to make QDeadlineTimer test robust against context switches
Instead of comparing to absolute values, compare the result from
QDeadlineTimer with the reference clock types from std::chrono. Pass
the test as long as we are within 10% of that reference.
In addition, handle the case where QTest::qSleep sleeps for more than
10% longer or shorter than what is requested, and if so, abort the
test.
Change-Id: If8b77aea55a8c5c53e96427b2fff2f78281d0f82
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp')
0 files changed, 0 insertions, 0 deletions