summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp')
-rw-r--r--tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
index be6049b3e6..6aa0995307 100644
--- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
+++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
@@ -348,6 +348,8 @@ void tst_QSharedMemory::attach()
QVERIFY(sm.detach());
// Make sure detach doesn't screw up something and we can't re-attach.
QVERIFY(sm.attach());
+ QVERIFY(sm.data() != 0);
+ QVERIFY(sm.size() != 0);
QVERIFY(sm.detach());
QCOMPARE(sm.size(), 0);
QVERIFY(sm.data() == 0);
@@ -374,7 +376,8 @@ void tst_QSharedMemory::lock()
QVERIFY(shm.lock());
QTest::ignoreMessage(QtWarningMsg, "QSharedMemory::lock: already locked");
QVERIFY(shm.lock());
- // don't lock forever
+ // we didn't unlock(), so ignore the warning from auto-detach in destructor
+ QTest::ignoreMessage(QtWarningMsg, "QSharedMemory::lock: already locked");
}
/*!