diff options
-rw-r--r-- | tests/auto/qscopedpointer/tst_qscopedpointer.cpp | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp index f319891..ddd5579 100644 --- a/tests/auto/qscopedpointer/tst_qscopedpointer.cpp +++ b/tests/auto/qscopedpointer/tst_qscopedpointer.cpp @@ -413,27 +413,6 @@ void tst_QScopedPointer::comparison() QCOMPARE( int(RefCounted::instanceCount), 0 ); { - // QCustomScopedPointer is an internal helper class -- it is unsupported! - - RefCounted *a = new RefCounted; - RefCounted *b = new RefCounted; - - QCOMPARE( int(RefCounted::instanceCount), 2 ); - - QCustomScopedPointer<RefCounted> pa1(a); - QCustomScopedPointer<RefCounted> pa2(a); - QCustomScopedPointer<RefCounted> pb(b); - - scopedPointerComparisonTest(pa1, pa2, pb); - - pa2.take(); - - QCOMPARE( int(RefCounted::instanceCount), 2 ); - } - - QCOMPARE( int(RefCounted::instanceCount), 0 ); - - { // QScopedSharedPointer is an internal helper class -- it is unsupported! RefCounted *a = new RefCounted; @@ -441,13 +420,9 @@ void tst_QScopedPointer::comparison() QCOMPARE( int(RefCounted::instanceCount), 2 ); - a->ref.ref(); - QScopedSharedPointer<RefCounted> pa1(a); - a->ref.ref(); - QScopedSharedPointer<RefCounted> pa2(a); - b->ref.ref(); - QScopedSharedPointer<RefCounted> pb(b); - + QSharedDataPointer<RefCounted> pa1(a); + QSharedDataPointer<RefCounted> pa2(a); + QSharedDataPointer<RefCounted> pb(b); QCOMPARE( int(a->ref), 2 ); QCOMPARE( int(b->ref), 1 ); |