diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-14 13:03:46 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2019-11-19 13:53:21 +0100 |
commit | 26e876912435bdafbca2b425af43824d7ec5b876 (patch) | |
tree | b7ee83cdd9de18ce5970bab0bb217a972d3d2445 /tests/auto/corelib/tools/qlinkedlist | |
parent | 7a6c6da2ebbfef33f7284ce5c96aa0c3acabc6bc (diff) | |
parent | bac999f38ca10147832846f6d7df1e4a051d3760 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
Diffstat (limited to 'tests/auto/corelib/tools/qlinkedlist')
-rw-r--r-- | tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp index df42b5dea9..ed0abff456 100644 --- a/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp +++ b/tests/auto/corelib/tools/qlinkedlist/tst_qlinkedlist.cpp @@ -225,8 +225,6 @@ private slots: void constSharedNullInt() const; void constSharedNullMovable() const; void constSharedNullComplex() const; - - void setSharableInt() const; private: template<typename T> void length() const; template<typename T> void first() const; @@ -1048,13 +1046,6 @@ template<typename T> void tst_QLinkedList::constSharedNull() const { QLinkedList<T> list2; -#if !defined(QT_NO_UNSHARABLE_CONTAINERS) - QLinkedList<T> list1; - list1.setSharable(false); - QVERIFY(list1.isDetached()); - - list2.setSharable(true); -#endif QVERIFY(!list2.isDetached()); } @@ -1077,57 +1068,5 @@ void tst_QLinkedList::constSharedNullComplex() const QCOMPARE(liveCount, Complex::getLiveCount()); } - -void tst_QLinkedList::setSharableInt() const -{ -#if !defined(QT_NO_UNSHARABLE_CONTAINERS) - QLinkedList<int> orglist; - orglist << 0 << 1 << 2 << 3 << 4 << 5; - int size = 6; - - QLinkedList<int> list; - list = orglist; - - QVERIFY(!list.isDetached()); - list.setSharable(true); - - QCOMPARE(list.size(), size); - - { - QLinkedList<int> copy(list); - QVERIFY(!copy.isDetached()); - QVERIFY(copy.isSharedWith(list)); - } - - list.setSharable(false); - QVERIFY(list.isDetached() || list.isSharedWith(QLinkedList<int>())); - - { - QLinkedList<int> copy(list); - - QVERIFY(copy.isDetached() || copy.isSharedWith(QLinkedList<int>())); - QCOMPARE(copy.size(), size); - QCOMPARE(copy, list); - } - - list.setSharable(true); - - { - QLinkedList<int> copy(list); - - QVERIFY(!copy.isDetached()); - QVERIFY(copy.isSharedWith(list)); - } - - QLinkedList<int>::const_iterator it = list.constBegin(); - for (int i = 0; i < list.size(); ++i) { - QCOMPARE(int(*it), i); - ++it; - } - - QCOMPARE(list.size(), size); -#endif -} - QTEST_APPLESS_MAIN(tst_QLinkedList) #include "tst_qlinkedlist.moc" |