tst_QDateTimeParser::intermediateYear(): adapt for Indian/Cocos zone
The zone had a transition at the start of 1900, used as default date by the parser. This leads to the default minutes and seconds being 2 and 20, rather than 0. Since this test is parsing a date-only string, only check the date of the result, to avoid failing in Cocos. Pick-to: 6.5 Change-Id: Ifb307eadb747097988bcf0afc6f307835ff2c8ec Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
b81515c58a
commit
90d4957c12
@ -140,10 +140,12 @@ void tst_QDateTimeParser::intermediateYear()
|
||||
|
||||
QVERIFY(testParser.parseFormat(format));
|
||||
|
||||
// Indian/Cocos has a transition at the start of 1900, so it started this
|
||||
// day at 00:02:20, throwing a time offset into QDTP.
|
||||
QDateTime val(QDate(1900, 1, 1).startOfDay());
|
||||
const QDateTimeParser::StateNode tmp = testParser.parse(input, -1, val, false);
|
||||
QCOMPARE(tmp.state, QDateTimeParser::Intermediate);
|
||||
QCOMPARE(tmp.value, expected.startOfDay());
|
||||
QCOMPARE(tmp.value.date(), expected);
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_QDateTimeParser)
|
||||
|
Loading…
Reference in New Issue
Block a user