Remove Q_ASSERT from qatomicint/pointer autotests

Some code in these tests is not intended to be executed, but rather to
detect compiler warnings.  Instead of having an obscure fatal error if
this code is run in a debug build, it now has a clear fatal error if run
in any build.

Change-Id: I1c9d27bb14ebf3313865b68e3e57668ba1d14e25
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 70f42ced8e01ddf0098b143e5804c22d55ebf16f)
This commit is contained in:
Jason McDonald 2011-04-19 18:02:33 +10:00 committed by Rohan McGovern
parent 3ac241a1d5
commit 94a7d439f2
2 changed files with 2 additions and 4 deletions

View File

@ -116,8 +116,7 @@ tst_QAtomicInt::~tst_QAtomicInt()
void tst_QAtomicInt::warningFreeHelper() void tst_QAtomicInt::warningFreeHelper()
{ {
Q_ASSERT(false); qFatal("This code is bogus, and shouldn't be run. We're looking for compiler warnings only.");
// The code below is bogus, and shouldn't be run. We're looking for warnings, only.
QBasicAtomicInt i = Q_BASIC_ATOMIC_INITIALIZER(0); QBasicAtomicInt i = Q_BASIC_ATOMIC_INITIALIZER(0);

View File

@ -98,8 +98,7 @@ struct WFHC
void tst_QAtomicPointer::warningFreeHelper() void tst_QAtomicPointer::warningFreeHelper()
{ {
Q_ASSERT(false); qFatal("This code is bogus, and shouldn't be run. We're looking for compiler warnings only.");
// The code below is bogus, and shouldn't be run. We're looking for warnings, only.
QBasicAtomicPointer<WFHC> p = Q_BASIC_ATOMIC_INITIALIZER(0); QBasicAtomicPointer<WFHC> p = Q_BASIC_ATOMIC_INITIALIZER(0);