diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2010-05-31 08:11:05 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2010-05-31 08:11:05 (GMT) |
commit | 3026f8ce811e8cebc48e49f732344cc13e107cc6 (patch) | |
tree | dd0992cfeec0f998ee03d7d19853bb1d493b5e50 /tests/auto | |
parent | 8c8f7639c1643473c5c10d4c5b9d3016c9cf070d (diff) | |
download | Qt-3026f8ce811e8cebc48e49f732344cc13e107cc6.zip Qt-3026f8ce811e8cebc48e49f732344cc13e107cc6.tar.gz Qt-3026f8ce811e8cebc48e49f732344cc13e107cc6.tar.bz2 |
Revert "Added native key support to QSharedMemory API."
This reverts commit 9b4ff3deb28b3d642dc4480207f2f23841cf26e9.
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp index dc071ab..1f65ae7 100644 --- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp +++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp @@ -225,17 +225,11 @@ void tst_QSharedMemory::key_data() { QTest::addColumn<QString>("constructorKey"); QTest::addColumn<QString>("setKey"); - QTest::addColumn<QString>("setNativeKey"); - - QTest::newRow("null, null, null") << QString() << QString() << QString(); - QTest::newRow("one, null, null") << QString("one") << QString() << QString(); - QTest::newRow("null, one, null") << QString() << QString("one") << QString(); - QTest::newRow("null, null, one") << QString() << QString() << QString("one"); - QTest::newRow("one, two, null") << QString("one") << QString("two") << QString(); - QTest::newRow("one, null, two") << QString("one") << QString() << QString("two"); - QTest::newRow("null, one, two") << QString() << QString("one") << QString("two"); - QTest::newRow("one, two, three") << QString("one") << QString("two") << QString("three"); - QTest::newRow("invalid") << QString("o/e") << QString("t/o") << QString("|x"); + + QTest::newRow("null, null") << QString() << QString(); + QTest::newRow("null, one") << QString() << QString("one"); + QTest::newRow("one, two") << QString("one") << QString("two"); + QTest::newRow("invalid") << QString("o/e") << QString("t/o"); } /*! @@ -245,17 +239,11 @@ void tst_QSharedMemory::key() { QFETCH(QString, constructorKey); QFETCH(QString, setKey); - QFETCH(QString, setNativeKey); QSharedMemory sm(constructorKey); QCOMPARE(sm.key(), constructorKey); - QCOMPARE(sm.nativeKey().isEmpty(), constructorKey.isEmpty()); sm.setKey(setKey); QCOMPARE(sm.key(), setKey); - QCOMPARE(sm.nativeKey().isEmpty(), setKey.isEmpty()); - sm.setNativeKey(setNativeKey); - QVERIFY(sm.key().isNull()); - QCOMPARE(sm.nativeKey(), setNativeKey); QCOMPARE(sm.isAttached(), false); QCOMPARE(sm.error(), QSharedMemory::NoError); @@ -274,7 +262,7 @@ void tst_QSharedMemory::create_data() QTest::addColumn<QSharedMemory::SharedMemoryError>("error"); QTest::newRow("null key") << QString() << 1024 - << false << QSharedMemory::KeyError; + << false << QSharedMemory::LockError; QTest::newRow("-1 size") << QString("negsize") << -1 << false << QSharedMemory::InvalidSize; QTest::newRow("nor size") << QString("norsize") << 1024 @@ -314,7 +302,7 @@ void tst_QSharedMemory::attach_data() QTest::addColumn<bool>("exists"); QTest::addColumn<QSharedMemory::SharedMemoryError>("error"); - QTest::newRow("null key") << QString() << false << QSharedMemory::KeyError; + QTest::newRow("null key") << QString() << false << QSharedMemory::LockError; QTest::newRow("doesn't exists") << QString("doesntexists") << false << QSharedMemory::NotFound; QTest::newRow("already exists") << QString(EXISTING_SHARE) << true << QSharedMemory::NoError; } |