From 453d8797f7c1090d6085a046e1f6e2728e251a9c Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 14 Jan 2025 14:06:49 +0100 Subject: [PATCH] QChronoTimer: add test for interval (u)int overflow Now when we ported all dispatchers to QAbstractEventDispatcherV2 interface, we can reliably verify that we support timers with > 24 days intervals. Also add a 50 days test to check for uint overflows. Adding larger intervals requires test adjustments, because for coarse timers the actual interval may be up to 5% larger then specified. Amends 0d0b346322f6b078e6fe60cd3612e8d08a0d5f00. Task-number: QTBUG-132388 Change-Id: I152cb305c8460801f16bba0c5cd6758c366bce84 Reviewed-by: Thiago Macieira --- .../kernel/qchronotimer/tst_qchronotimer.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/auto/corelib/kernel/qchronotimer/tst_qchronotimer.cpp b/tests/auto/corelib/kernel/qchronotimer/tst_qchronotimer.cpp index 2fb29a2e874..370d5da91a6 100644 --- a/tests/auto/corelib/kernel/qchronotimer/tst_qchronotimer.cpp +++ b/tests/auto/corelib/kernel/qchronotimer/tst_qchronotimer.cpp @@ -252,10 +252,14 @@ void tst_QChronoTimer::remainingTimeInitial_data() QTest::addRow("precisetiemr-0ns") << 0ns << Qt::PreciseTimer; QTest::addRow("precisetimer-1ms") << nanoseconds{1ms} << Qt::PreciseTimer; QTest::addRow("precisetimer-10ms") <