diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-03-24 15:00:44 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-04-14 15:19:03 +0200 |
commit | d43391422aaecc35d6e6435c9442673c5d585565 (patch) | |
tree | 97c0dab1bc559c3a6ba702ec771138fb23c78c35 /tests/auto | |
parent | 5432a8040f8c459f1732ca45ae86ad8edefca919 (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>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 2 |
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)); |