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>
This commit is contained in:
parent
b4de0b1721
commit
bf7d30bf1f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user