summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-25 16:13:58 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-06-26 09:20:09 (GMT)
commit206fc25d734f01d2812653d78eaa625cd20b34e3 (patch)
tree9af2517c142b1c2412bc86e6d95dc8f650fce2e7
parent937e92fe83436c0d02e1a3c1783fc896ffae67ad (diff)
downloadQt-206fc25d734f01d2812653d78eaa625cd20b34e3.zip
Qt-206fc25d734f01d2812653d78eaa625cd20b34e3.tar.gz
Qt-206fc25d734f01d2812653d78eaa625cd20b34e3.tar.bz2
Autotest: Fix a few test names and allow me to see the compilation errors
Reviewed-by: TrustMe
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index a11164f..db93fc9 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -908,7 +908,7 @@ void tst_QSharedPointer::invalidConstructs_data()
QTest::newRow("implicit-initialization3")
<< &QTest::QExternalTest::tryCompileFail
<< "QWeakPointer<Data> ptr = new Data;";
- QTest::newRow("implicit-initialization1")
+ QTest::newRow("implicit-initialization4")
<< &QTest::QExternalTest::tryCompileFail
<< "QWeakPointer<Data> ptr;"
"ptr = new Data;";
@@ -972,11 +972,13 @@ void tst_QSharedPointer::invalidConstructs_data()
<< &QTest::QExternalTest::tryCompileFail
<< "QSharedPointer<Data> ptr1;\n"
"QSharedPointer<int> ptr2 = qSharedPointerCast<int>(ptr1);";
+#ifndef QTEST_NO_RTTI
QTest::newRow("invalid-cast2")
<< &QTest::QExternalTest::tryCompileFail
<< "QSharedPointer<Data> ptr1;\n"
"QSharedPointer<int> ptr2 = qSharedPointerDynamicCast<int>(ptr1);";
- QTest::newRow("implicit-initialization1")
+#endif
+ QTest::newRow("invalid-cast3")
<< &QTest::QExternalTest::tryCompileFail
<< "QSharedPointer<Data> ptr1;\n"
"QSharedPointer<int> ptr2 = qSharedPointerConstCast<int>(ptr1);";
@@ -1024,7 +1026,12 @@ void tst_QSharedPointer::invalidConstructs()
QByteArray body = code.toLatin1();
- if (!(test.*testFunction)(body)) {
+ bool result = (test.*testFunction)(body);
+ if (qgetenv("QTEST_EXTERNAL_DEBUG").toInt() > 0) {
+ qDebug("External test output:");
+ printf("%s\n", test.standardError().constData());
+ }
+ if (!result) {
qWarning("External code testing failed\nCode:\n%s\n", body.constData());
QFAIL("Fail");
}