summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-11-24 17:34:51 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-25 07:56:16 +0100
commite08410ab8db3d7cabf4ef2fc4de40bb6da6d6fef (patch)
tree9d6e154364039ab6cbc7a789ef33b7e0ce038e51 /tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
parent489a39aacc102e46a5b3fffd5839ed694bb7214f (diff)
Cleanup corelib autotests
Bug trackers come and go, so using bug identifiers in function and test case names will ensure that those names eventually become meaningless. It is better to choose a meaningful name and provide explanatory comments where appropriate. Change-Id: I67c27782ef21b5d4eaab4854079a043c8ef6957b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index 94f6fc1c12..c4acf5be76 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -1838,7 +1838,7 @@ void tst_QSharedPointer::invalidConstructs()
}
}
-namespace QTBUG11730 {
+namespace ReentrancyWhileDestructing {
struct IB
{
virtual ~IB() {}
@@ -1881,17 +1881,14 @@ namespace QTBUG11730 {
};
}
+// This is a regression test for QTBUG-11730, where there would be a crash if
+// the destructor of a QSharedPointer object being deleted recursed back into
+// the same QSharedPointer object. There are no explicit verification steps
+// in this test -- it is sufficient that the code does not crash.
void tst_QSharedPointer::reentrancyWhileDestructing()
{
- // this bug is about recursing back into QSharedPointer::clear()
- // from inside it
- // that is, the destructor of the object being deleted recurses
- // into the same QSharedPointer object.
- // First reported as QTBUG-11730
- QTBUG11730::A obj;
+ ReentrancyWhileDestructing::A obj;
}
-
QTEST_MAIN(tst_QSharedPointer)
-
#include "tst_qsharedpointer.moc"