diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-04 00:56:50 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-04 04:44:47 (GMT) |
commit | 8a1279b0ae180fae94d3da1a4eeb20df5a748d33 (patch) | |
tree | b9a785a971b8b01667c0748b02a89e683c2c357c /tests | |
parent | 614474fb3d440eabd3ba7e381d246064ce39f4fa (diff) | |
download | Qt-8a1279b0ae180fae94d3da1a4eeb20df5a748d33.zip Qt-8a1279b0ae180fae94d3da1a4eeb20df5a748d33.tar.gz Qt-8a1279b0ae180fae94d3da1a4eeb20df5a748d33.tar.bz2 |
Remove Q_ASSERT's from qtestlib selftests
Report a fatal error in all builds rather than just in debug mode
builds.
Change-Id: Ie54e55ea2dd13bbb12e4265278db832ac1297c28
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/selftests/alive/qtestalive.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/selftests/alive/qtestalive.cpp b/tests/auto/selftests/alive/qtestalive.cpp index ba42367..e743eae 100644 --- a/tests/auto/selftests/alive/qtestalive.cpp +++ b/tests/auto/selftests/alive/qtestalive.cpp @@ -78,7 +78,8 @@ private: QTestAlivePinger::QTestAlivePinger(QObject *receiver, QObject *parent) : QObject(parent), rec(receiver), currentSequenceId(0), lastSequenceId(0) { - Q_ASSERT(rec); + if (!rec) + qFatal("Null receiver object passed to QTestAlivePinger::QTestAlivePinger()"); timerId = startTimer(850); } @@ -147,8 +148,8 @@ bool QTestAlive::event(QEvent *e) void QTestAlive::run() { - Q_ASSERT_X(QCoreApplication::instance(), "QTestAlive::run()", - "Cannot start QTestAlive without a QCoreApplication instance."); + if (!QCoreApplication::instance()) + qFatal("QTestAlive::run(): Cannot start QTestAlive without a QCoreApplication instance."); QTestAlivePinger p(this); pinger = &p; |