diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-03 16:14:03 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 10:46:43 +1000 |
commit | 42d6820c7c1f43b7fd633579c1ba494212d0176f (patch) | |
tree | ad47a6fe427c9c890244a3a78f469139c2838aa9 | |
parent | ab6c90367d01d1961b4969c8eb45399db17f8cec (diff) |
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
(cherry picked from commit b988b2f9f04ac0ebce7a779cd9bd5d394bfa1c95)
-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 bb04621b67..96d087384b 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; } |