From: Jason McDonald Date: Fri, 7 Oct 2011 01:26:37 +0000 (+1000) Subject: Fail test in preference to calling qFatal. X-Git-Tag: qt-v5.0.0-alpha1~3303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf7d30bf1fc873e07fbfb82236a0b7d6728f41fc;p=profile%2Fivi%2Fqtbase.git 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 Reviewed-by: Rohan McGovern --- diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index 5ad0b1c..ff776b9 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(&aData) == *reinterpret_cast(&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 ptr = QSharedPointer(aData);