avoid redundant tests

tryRun() already implies tryLink() and tryCompile(), so there is no
point in executing the stages separately ...

Change-Id: Id7321efaca474e8c5db2bc246ac26323d8a99e58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2012-05-02 11:34:05 +02:00 committed by Qt by Nokia
parent 03fa5dfa27
commit 98c7afb8d6

View File

@ -1825,13 +1825,9 @@ void tst_QSharedPointer::invalidConstructs()
QFETCH(QString, code);
static bool sane = true;
if (code.isEmpty()) {
static const char snippet[] = "QSharedPointer<Data> baseptr; QSharedPointer<DerivedData> ptr;";
if (!test.tryCompile("")
|| !test.tryRun("")
if (!test.tryRun("")
|| !test.tryRunFail("exit(1);")
|| !test.tryCompile(snippet)
|| !test.tryLink(snippet)
|| !test.tryRun(snippet)) {
|| !test.tryRun("QSharedPointer<Data> baseptr; QSharedPointer<DerivedData> ptr;")) {
sane = false;
qWarning("Sanity checking failed\nCode:\n%s\n",
qPrintable(test.errorReport()));