summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-03-24 15:00:44 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2023-04-14 15:19:03 +0200
commitd43391422aaecc35d6e6435c9442673c5d585565 (patch)
tree97c0dab1bc559c3a6ba702ec771138fb23c78c35
parent5432a8040f8c459f1732ca45ae86ad8edefca919 (diff)
Correct the start of a QDTE::stepIntoDSTGap() test
The test wants to start shortly after the transition, then step an hour backwards, into it, to check we land safely on the other side. However, it assumed the gap witdh was an hour, which is not reliable. Use the gapWidth already used in computing springGap instead. The -3590 seconds in the result time is correct, as it's the ten extra seconds we started beyond the gap, minus the hour we step backwards. Pick-to: 6.5 Change-Id: I4399af7e54a60bd55ea51d054d3cd2ecfcb0e354 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 89b20065e9..59ec032c48 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -4723,7 +4723,7 @@ void tst_QDateTimeEdit::stepIntoDSTGap_data()
// 3:00:10 into 2:00:10 should get us to 1:00:10
QTest::addRow("hour down into %s gap", springTime.data())
- << QDateTime(spring, springGap.addSecs(3610))
+ << QDateTime(spring, springGap.addSecs(gapWidth + 10))
<< QDateTimeEdit::HourSection
<< -1
<< QDateTime(spring, springGap.addSecs(-3590));