summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-27 15:18:52 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-27 15:18:52 (GMT)
commit9d492514c9bd09fdb95984b71b7d5b46ceb0404b (patch)
tree42a1f443728ded09670d207039dbd93290f57a01
parent29a6377c6539840ca901bdcb045a42b7832ac98a (diff)
parent589c42c4f3cb51bc23592f8fdbfb7af08998929b (diff)
downloadQt-9d492514c9bd09fdb95984b71b7d5b46ceb0404b.zip
Qt-9d492514c9bd09fdb95984b71b7d5b46ceb0404b.tar.gz
Qt-9d492514c9bd09fdb95984b71b7d5b46ceb0404b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: Make tst_qdatetime failures more verbose.
-rw-r--r--tests/auto/qdatetime/tst_qdatetime.cpp56
1 files changed, 40 insertions, 16 deletions
diff --git a/tests/auto/qdatetime/tst_qdatetime.cpp b/tests/auto/qdatetime/tst_qdatetime.cpp
index 0900b35..1a82a4c 100644
--- a/tests/auto/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/qdatetime/tst_qdatetime.cpp
@@ -961,14 +961,26 @@ void tst_QDateTime::currentDateTime()
upperBound.setTime_t(buf2);
upperBound = upperBound.addSecs(1);
- QVERIFY(lowerBound < upperBound);
-
- QVERIFY(lowerBound <= dt1);
- QVERIFY(dt1 < upperBound);
- QVERIFY(lowerBound <= dt2);
- QVERIFY(dt2 < upperBound);
- QVERIFY(lowerBound <= dt3);
- QVERIFY(dt3 < upperBound);
+ QString details = QString("\n"
+ "lowerBound: %1\n"
+ "dt1: %2\n"
+ "dt2: %3\n"
+ "dt3: %4\n"
+ "upperBound: %5\n")
+ .arg(lowerBound.toTime_t())
+ .arg(dt1.toTime_t())
+ .arg(dt2.toTime_t())
+ .arg(dt3.toTime_t())
+ .arg(upperBound.toTime_t());
+
+ QVERIFY2(lowerBound < upperBound, qPrintable(details));
+
+ QVERIFY2(lowerBound <= dt1, qPrintable(details));
+ QVERIFY2(dt1 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt2, qPrintable(details));
+ QVERIFY2(dt2 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt3, qPrintable(details));
+ QVERIFY2(dt3 < upperBound, qPrintable(details));
QVERIFY(dt1.timeSpec() == Qt::LocalTime);
QVERIFY(dt2.timeSpec() == Qt::LocalTime);
@@ -1000,14 +1012,26 @@ void tst_QDateTime::currentDateTimeUtc()
upperBound.setTime_t(buf2);
upperBound = upperBound.addSecs(1);
- QVERIFY(lowerBound < upperBound);
-
- QVERIFY(lowerBound <= dt1);
- QVERIFY(dt1 < upperBound);
- QVERIFY(lowerBound <= dt2);
- QVERIFY(dt2 < upperBound);
- QVERIFY(lowerBound <= dt3);
- QVERIFY(dt3 < upperBound);
+ QString details = QString("\n"
+ "lowerBound: %1\n"
+ "dt1: %2\n"
+ "dt2: %3\n"
+ "dt3: %4\n"
+ "upperBound: %5\n")
+ .arg(lowerBound.toTime_t())
+ .arg(dt1.toTime_t())
+ .arg(dt2.toTime_t())
+ .arg(dt3.toTime_t())
+ .arg(upperBound.toTime_t());
+
+ QVERIFY2(lowerBound < upperBound, qPrintable(details));
+
+ QVERIFY2(lowerBound <= dt1, qPrintable(details));
+ QVERIFY2(dt1 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt2, qPrintable(details));
+ QVERIFY2(dt2 < upperBound, qPrintable(details));
+ QVERIFY2(lowerBound <= dt3, qPrintable(details));
+ QVERIFY2(dt3 < upperBound, qPrintable(details));
QVERIFY(dt1.timeSpec() == Qt::UTC);
QVERIFY(dt2.timeSpec() == Qt::LocalTime);