summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qtime
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-11-09 18:53:51 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2017-11-30 20:19:13 +0000
commita755c2e52126bea850a04487a9a7d446b03e892a (patch)
tree63b6ad75e3eb9344909c6483a933d924d54e1e05 /tests/auto/corelib/tools/qtime
parentba19363529f4c099c6831c26d3acf98fa0c5f702 (diff)
Raise the upper bound on years to 9999
Test-case taken from bug-report; fits in as an easy row in an existing data-driven test. Add similar tests for date-time and time; and an isValid test on the end of year 9999. The date-time parser was using the end of year 7999 as maximum value for dates and date-times; extend this to year 9999, as I can see no reason not to. [ChangeLog][QtCore][QDateTime] Years up to 9999 can now be parsed without error (previously 8000 and beyond were treated as invalid) in all formats (not only in ISO format). Widgets handling dates now support dates to 9999, likewise. Task-number: QTBUG-64401 Change-Id: I518cfa6c2cb4ecc5a85b896dc9e56b4fdd8a8bb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools/qtime')
-rw-r--r--tests/auto/corelib/tools/qtime/tst_qtime.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
index 162047b537..3e5724213e 100644
--- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp
+++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
@@ -562,6 +562,7 @@ void tst_QTime::fromStringFormat_data()
QTest::newRow("data11") << QString("02:23pm") << QString("hh:mmap") << QTime(14,23,0,0);
QTest::newRow("short-msecs-lt100") << QString("10:12:34:045") << QString("hh:m:ss:z") << QTime(10,12,34,45);
QTest::newRow("short-msecs-gt100") << QString("10:12:34:45") << QString("hh:m:ss:z") << QTime(10,12,34,450);
+ QTest::newRow("late") << QString("23:59:59.999") << QString("hh:mm:ss.z") << QTime(23, 59, 59, 999);
}
void tst_QTime::fromStringFormat()