summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qvector/tst_qvector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qvector/tst_qvector.cpp')
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index 6afc676576..69da6e450e 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -1512,11 +1512,18 @@ void tst_QVector::remove() const
QVERIFY(myvec.removeOne(val2));
QCOMPARE(myvec, QVector<T>() << val1 << val3 << val1 << val3 << val1 << val2 << val3);
+ QVector<T> myvecCopy = myvec;
+ QVERIFY(myvecCopy.isSharedWith(myvec));
// removeAll()
QCOMPARE(myvec.removeAll(val4), 0);
+ QVERIFY(myvecCopy.isSharedWith(myvec));
QCOMPARE(myvec.removeAll(val1), 3);
+ QVERIFY(!myvecCopy.isSharedWith(myvec));
QCOMPARE(myvec, QVector<T>() << val3 << val3 << val2 << val3);
+ myvecCopy = myvec;
+ QVERIFY(myvecCopy.isSharedWith(myvec));
QCOMPARE(myvec.removeAll(val2), 1);
+ QVERIFY(!myvecCopy.isSharedWith(myvec));
QCOMPARE(myvec, QVector<T>() << val3 << val3 << val3);
// remove rest