diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-03 06:14:03 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-04 04:38:15 (GMT) |
commit | b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95 (patch) | |
tree | f5830a6441afd0a5f788fdf49c6b62cf1de891cd /tests/auto/qsharedpointer | |
parent | fed42f25e129af1f4f2c03a075530ad7111d2fdd (diff) | |
download | Qt-b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95.zip Qt-b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95.tar.gz Qt-b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95.tar.bz2 |
Remove Q_ASSERT from QSharedPointer autotest
Report a meaningful fatal error instead of aborting in debug mode builds
and failing silently in release mode builds.
Change-Id: I0f939dc40810f072a3e24aeba085191793c49ef3
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qsharedpointer')
-rw-r--r-- | tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index f25f8e8..6250219 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -139,7 +139,8 @@ public: virtual ~Data() { - Q_ASSERT_X(generation > 0, "tst_QSharedPointer", "Double deletion!"); + if (generation <= 0) + qFatal("tst_qsharedpointer: Double deletion!"); generation = 0; ++destructorCounter; } |