diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-13 04:45:22 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-13 04:45:22 (GMT) |
commit | fbacd0fb2eb41470b090a3cbca7535f78689a382 (patch) | |
tree | 4f6ca32958fd9c5c95ae9ca2f599bf56067d2c45 /tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp | |
parent | 3e94b3a77affeef80544e48949e018ced4e0d96e (diff) | |
parent | 9f0884773a451a4feef80812e015266bd487dcdc (diff) | |
download | Qt-fbacd0fb2eb41470b090a3cbca7535f78689a382.zip Qt-fbacd0fb2eb41470b090a3cbca7535f78689a382.tar.gz Qt-fbacd0fb2eb41470b090a3cbca7535f78689a382.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (61 commits)
Revert Merge Request 551. This introduces regressions to Qt.
Fixed scroll area size calculation on Mac.
Fix a race where QThread::exit() is "lost" when called after start()
make a partial build of linguist in no-gui config
make the code less of a trap
fix build from top level
Partially revert MR 543 changes to Linguist.
Apply f176759fc41abc4cb901c2cbaa15264f2a9ac85b to stdout too.
Autotest: add some debugging, just in case there's something wrong
Autotest: fix the fix for the rounding error.
Fix compile error with QT_NO_LIBRARY in QtMultimedia
the _setmode() prototype is different on win ce
qdoc: Changed qdoc to output the new doc format.
Doc: update 'developing on mac'
fcntl.h doesn't seem to exist, either - contrary to an example on msdn
Autotest: fix paths on the test server after update.
Force the repaint during a window resize.
fix compile on wince
remove CONFIG += ordered again
Assistant: Check namespace and virtual folder syntax of help projects.
...
Diffstat (limited to 'tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp')
-rw-r--r-- | tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp index 9ea422c..87df57d 100644 --- a/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp +++ b/tests/auto/qelapsedtimer/tst_qelapsedtimer.cpp @@ -46,6 +46,17 @@ static const int minResolution = 50; // the minimum resolution for the tests +QDebug operator<<(QDebug s, const QElapsedTimer &t) +{ + union { + QElapsedTimer t; + struct { qint64 t1, t2; } i; + } copy; + copy.t = t; + s.nospace() << "(" << copy.i.t1 << ", " << copy.i.t2 << ")"; + return s.space(); +} + class tst_QElapsedTimer : public QObject { Q_OBJECT @@ -110,15 +121,17 @@ void tst_QElapsedTimer::basics() #endif quint64 value1 = t1.msecsSinceReference(); + qDebug() << value1 << t1; qint64 elapsed = t1.restart(); QVERIFY(elapsed < minResolution); quint64 value2 = t1.msecsSinceReference(); + qDebug() << value2 << t1 << elapsed; // in theory, elapsed == value2 - value1 // However, since QElapsedTimer keeps internally the full resolution, // we have here a rounding error due to integer division - QVERIFY(qAbs(elapsed - qint64(value2 - value1)) < 1); + QVERIFY(qAbs(elapsed - qint64(value2 - value1)) <= 1); } void tst_QElapsedTimer::elapsed() |