From 98c7afb8d6e8724bb12906b65795df91b4bb55f9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 2 May 2012 11:34:05 +0200 Subject: 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 --- tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp') diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index bb9be1d65f..506bab6a23 100644 --- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp @@ -1825,13 +1825,9 @@ void tst_QSharedPointer::invalidConstructs() QFETCH(QString, code); static bool sane = true; if (code.isEmpty()) { - static const char snippet[] = "QSharedPointer baseptr; QSharedPointer 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 baseptr; QSharedPointer ptr;")) { sane = false; qWarning("Sanity checking failed\nCode:\n%s\n", qPrintable(test.errorReport())); -- cgit v1.2.3