diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-06-30 09:21:56 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-06-30 09:21:56 (GMT) |
commit | 197df24edfe095a10e2bf65116796e027fea44e2 (patch) | |
tree | 4ffb08f614b550298663f90297c9e559ecb47a3c /tests/auto/qsharedpointer | |
parent | 1e84894225e31adf80a7a33da7f655fb5c38ea0e (diff) | |
parent | e3c1039d4d10aa383a1f681e7dd9c1129d22d8ca (diff) | |
download | Qt-197df24edfe095a10e2bf65116796e027fea44e2.zip Qt-197df24edfe095a10e2bf65116796e027fea44e2.tar.gz Qt-197df24edfe095a10e2bf65116796e027fea44e2.tar.bz2 |
Merge commit 'qt/master-stable' into 4.6-merged
Conflicts:
.gitignore
configure.exe
src/corelib/concurrent/qtconcurrentthreadengine.h
src/corelib/global/qnamespace.h
src/gui/graphicsview/qgraphicssceneevent.h
src/gui/kernel/qapplication.cpp
src/gui/kernel/qapplication.h
src/gui/kernel/qapplication_p.h
src/gui/kernel/qapplication_qws.cpp
src/gui/kernel/qwidget.h
src/gui/painting/qpaintengine_raster.cpp
src/gui/text/qfontdatabase.cpp
src/network/access/qnetworkaccesshttpbackend.cpp
tests/auto/network-settings.h
tests/auto/qscriptjstestsuite/qscriptjstestsuite.pro
tests/auto/qvariant/tst_qvariant.cpp
Diffstat (limited to 'tests/auto/qsharedpointer')
-rw-r--r-- | tests/auto/qsharedpointer/externaltests.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qsharedpointer/externaltests.h | 4 | ||||
-rw-r--r-- | tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 20 |
3 files changed, 18 insertions, 10 deletions
diff --git a/tests/auto/qsharedpointer/externaltests.cpp b/tests/auto/qsharedpointer/externaltests.cpp index 1e9629e..18df37c 100644 --- a/tests/auto/qsharedpointer/externaltests.cpp +++ b/tests/auto/qsharedpointer/externaltests.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qsharedpointer/externaltests.h b/tests/auto/qsharedpointer/externaltests.h index e92ae77..24a3236 100644 --- a/tests/auto/qsharedpointer/externaltests.h +++ b/tests/auto/qsharedpointer/externaltests.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 3ae849d..3adef09 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. ** @@ -34,12 +34,12 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ - +#define QT_SHAREDPOINTER_TRACK_POINTERS #include "qsharedpointer.h" #include "externaltests.h" #include <QtTest/QtTest> @@ -912,7 +912,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;"; @@ -976,11 +976,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);"; @@ -999,6 +1001,7 @@ void tst_QSharedPointer::invalidConstructs() test.setDebugMode(true); test.setQtModules(QTest::QExternalTest::QtCore); test.setProgramHeader( + "#define QT_SHAREDPOINTER_TRACK_POINTERS\n" "#include <QtCore/qsharedpointer.h>\n" "\n" "struct Data { int i; };\n" @@ -1027,7 +1030,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"); } |