summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-05-02 11:34:05 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-01 20:34:31 +0200
commit98c7afb8d6e8724bb12906b65795df91b4bb55f9 (patch)
tree734e1a8eb56c6afbcf3bf6ce1af190f24d1a9087 /tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
parent03fa5dfa27de2bfc78339b4879c123e5abc26801 (diff)
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>
Diffstat (limited to 'tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp8
1 files changed, 2 insertions, 6 deletions
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<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()));