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>
bb10
Edward Welbourne 2023-03-24 15:00:44 +01:00
parent 5432a8040f
commit d43391422a
1 changed files with 1 additions and 1 deletions

View File

@ -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));