diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-07 11:26:37 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-07 04:30:30 +0200 |
commit | bf7d30bf1fc873e07fbfb82236a0b7d6728f41fc (patch) | |
tree | b8838aeaa29f296f9b674e01a1c12a20338fb332 /tests/auto/corelib/tools | |
parent | b4de0b17211c58fdecece48d065e8b2dac53711c (diff) |
Fail test in preference to calling qFatal.
Calling qFatal may result in test output not being well-formed.
Change-Id: Ia16bade4d3311485c6ba4dd23d5624d18b192b71
Reviewed-on: http://codereview.qt-project.org/6190
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r-- | tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 5ad0b1c208..ff776b9752 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -817,10 +817,8 @@ void tst_QSharedPointer::differentPointers() // ensure that this compiler isn't broken if (*reinterpret_cast<quintptr *>(&aData) == *reinterpret_cast<quintptr *>(&aBase)) - qFatal("Something went very wrong -- we couldn't create two different pointers to the same object"); - if (aData != aBase) - QSKIP("Broken compiler", SkipAll); - if (aBase != aData) + QFAIL("Something went very wrong -- we couldn't create two different pointers to the same object"); + if (aData != aBase || aBase != aData) QSKIP("Broken compiler", SkipAll); QSharedPointer<DiffPtrDerivedData> ptr = QSharedPointer<DiffPtrDerivedData>(aData); |