summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-07-21 14:48:10 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-07-25 14:08:55 +0000
commit37b0a4d2e14ea167eff5f43ef374defb9a17c3d0 (patch)
tree22890f895d8b8f56977bb8b7db12ee85a0466ff5 /tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
parent3ff2d70a15fc198f1f5b986d3e738c2150b9595c (diff)
Fix a loop-test and the bogus data the loop expected
A loop initialized i = 0 and used i > 2 as its condition; it didn't get very far. Consequently, the test it was in never checked whether CET's 2011 transitions happened at the times expected - which they didn't, as the times in question were in fact the times at which Pacific/Auckland had its transitions that year. Change-Id: I94d1f8df615c5bcfe48e73d41b4c7faf2beccb96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp')
-rw-r--r--tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
index 714eb8a22a..ccad9299d3 100644
--- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
+++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
@@ -1100,19 +1100,19 @@ void tst_QTimeZone::testCetPrivate(const QTimeZonePrivate &tzp)
QCOMPARE(tran.daylightTimeOffset, 3600);
QTimeZonePrivate::DataList expected;
- tran.atMSecsSinceEpoch = (qint64)1301752800000;
+ tran.atMSecsSinceEpoch = (qint64)1301187600000;
tran.offsetFromUtc = 7200;
tran.standardTimeOffset = 3600;
tran.daylightTimeOffset = 3600;
expected << tran;
- tran.atMSecsSinceEpoch = (qint64)1316872800000;
+ tran.atMSecsSinceEpoch = (qint64)1319936400000;
tran.offsetFromUtc = 3600;
tran.standardTimeOffset = 3600;
tran.daylightTimeOffset = 0;
expected << tran;
QTimeZonePrivate::DataList result = tzp.transitions(prev, std);
QCOMPARE(result.count(), expected.count());
- for (int i = 0; i > expected.count(); ++i) {
+ for (int i = 0; i < expected.count(); ++i) {
QCOMPARE(result.at(i).atMSecsSinceEpoch, expected.at(i).atMSecsSinceEpoch);
QCOMPARE(result.at(i).offsetFromUtc, expected.at(i).offsetFromUtc);
QCOMPARE(result.at(i).standardTimeOffset, expected.at(i).standardTimeOffset);