diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2011-01-11 12:26:19 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-01-11 12:26:19 (GMT) |
commit | 54db2506e8f228487c109ec7efc7a2a9681e9087 (patch) | |
tree | dfea048797fa6bfee3b79f80f09dfaae9c9e0746 | |
parent | 7afc73d1a894c2395ec8ba099adf4fb49ce561e3 (diff) | |
download | Qt-54db2506e8f228487c109ec7efc7a2a9681e9087.zip Qt-54db2506e8f228487c109ec7efc7a2a9681e9087.tar.gz Qt-54db2506e8f228487c109ec7efc7a2a9681e9087.tar.bz2 |
fix/stabilizate the year sign change test
this test might fail for the Qt::LocalTime spec in some cases
Merge-request: 2536
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
-rw-r--r-- | tests/auto/qdatetime/tst_qdatetime.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp index 1841487..851e1ee 100644 --- a/tests/auto/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/qdatetime/tst_qdatetime.cpp @@ -705,12 +705,12 @@ void tst_QDateTime::addSecs_data() } // Year sign change - QTest::newRow("toNegative") << QDateTime(QDate(1, 1, 1), QTime(0, 0, 0)) + QTest::newRow("toNegative") << QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), Qt::UTC) << -1 - << QDateTime(QDate(-1, 12, 31), QTime(23, 59, 59)); - QTest::newRow("toPositive") << QDateTime(QDate(-1, 12, 31), QTime(23, 59, 59)) + << QDateTime(QDate(-1, 12, 31), QTime(23, 59, 59), Qt::UTC); + QTest::newRow("toPositive") << QDateTime(QDate(-1, 12, 31), QTime(23, 59, 59), Qt::UTC) << 1 - << QDateTime(QDate(1, 1, 1), QTime(0, 0, 0)); + << QDateTime(QDate(1, 1, 1), QTime(0, 0, 0), Qt::UTC); // Gregorian/Julian switchover QTest::newRow("toGregorian") << QDateTime(QDate(1582, 10, 4), QTime(23, 59, 59)) |