summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsharedpointer
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-20 14:58:58 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-20 14:58:58 (GMT)
commit851a858fcd28c35dff2ffbeffdb40f7ee69f45b4 (patch)
treef76f604982f127af7ef66d904038cdfa705ff3af /tests/auto/qsharedpointer
parentefea248b4b725ca429793874eb168ad4b43c7994 (diff)
parentc0b24b7ce12387aff6e74b05b4060c61a58d87e0 (diff)
downloadQt-851a858fcd28c35dff2ffbeffdb40f7ee69f45b4.zip
Qt-851a858fcd28c35dff2ffbeffdb40f7ee69f45b4.tar.gz
Qt-851a858fcd28c35dff2ffbeffdb40f7ee69f45b4.tar.bz2
Merge commit 'qt/master'
Conflicts: examples/painting/svgviewer/files/bubbles.svg src/corelib/kernel/qobject.cpp src/network/kernel/qhostinfo.cpp tests/auto/qhostinfo/tst_qhostinfo.cpp
Diffstat (limited to 'tests/auto/qsharedpointer')
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 1d75e0a..50818fe 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -803,6 +803,7 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr.data() == aData);
QVERIFY(aData == baseptr.data());
+ QVERIFY(bool(operator==<Data,DiffPtrDerivedData>(baseptr, aData)));
QVERIFY(baseptr == aData);
QVERIFY(aData == baseptr);
}
@@ -1658,21 +1659,6 @@ void tst_QSharedPointer::invalidConstructs_data()
<< "QObject *ptr = new QObject;\n"
"QWeakPointer<QObject> weak = ptr;\n" // this makes the object unmanaged
"QSharedPointer<QObject> shared(ptr);\n";
-
-#ifndef QT_NO_DEBUG
- // this tests a Q_ASSERT, so it is only valid in debug mode
- // the DerivedFromQObject destructor below creates a QWeakPointer from parent().
- // parent() is not 0 in the current Qt implementation, but has started destruction,
- // so the code should detect that issue
- QTest::newRow("shared-pointer-from-qobject-in-destruction")
- << &QTest::QExternalTest::tryRunFail
- << "class DerivedFromQObject: public QObject { public:\n"
- " DerivedFromQObject(QObject *parent): QObject(parent) {}\n"
- " ~DerivedFromQObject() { QWeakPointer<QObject> weak = parent(); }\n"
- "};\n"
- "QObject obj;\n"
- "new DerivedFromQObject(&obj);";
-#endif
}
void tst_QSharedPointer::invalidConstructs()