summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm')
-rw-r--r--tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm23
1 files changed, 1 insertions, 22 deletions
diff --git a/tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm b/tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm
index e18d848f87..e7923b47f3 100644
--- a/tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm
+++ b/tests/auto/corelib/tools/qmacautoreleasepool/tst_qmacautoreleasepool.mm
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QTest>
@@ -14,7 +14,6 @@ private slots:
void noPool();
void rootLevelPool();
void stackAllocatedPool();
- void heapAllocatedPool();
};
static id lastDeallocedObject = nil;
@@ -63,26 +62,6 @@ void tst_QMacAutoreleasePool::stackAllocatedPool()
[pool drain];
}
-void tst_QMacAutoreleasePool::heapAllocatedPool()
-{
- // The special case, a pool allocated on the heap, or as a member of a
- // heap allocated object. This is not a supported use of QMacAutoReleasePool,
- // and will result in warnings if the pool is prematurely drained.
-
- NSObject *allocedObject = nil;
- {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- QMacAutoReleasePool *qtPool = nullptr;
- {
- qtPool = new QMacAutoReleasePool;
- allocedObject = [[[DeallocTracker alloc] init] autorelease];
- }
- [pool drain];
- delete qtPool;
- }
- QCOMPARE(lastDeallocedObject, allocedObject);
-}
-
QTEST_APPLESS_MAIN(tst_QMacAutoreleasePool)
#include "tst_qmacautoreleasepool.moc"