summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-08-14 11:42:13 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-01-05 20:18:41 +0100
commit832aea1e8e3466fa9e0fe6cf15c854f906f51a42 (patch)
tree5fdcbfe4a95245202a69fa614d4f6099f9677119 /tests
parent13ec068ce278bdf003b26abe05658668e91afe09 (diff)
tst_QSet: add a non-trivial test for op==
Change-Id: Id42b2361e8741ee0d719fd52885a2d6dfdf6a634 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index f04eefad51..b86ee24ac7 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -137,6 +137,16 @@ void tst_QSet::operator_eq()
QVERIFY(a != b);
QVERIFY(!(a == b));
}
+
+ {
+ QSet<int> s1, s2;
+ s1.reserve(100);
+ s2.reserve(4);
+ QVERIFY(s1 == s2);
+ s1 << 100 << 200 << 300 << 400;
+ s2 << 400 << 300 << 200 << 100;
+ QVERIFY(s1 == s2);
+ }
}
void tst_QSet::swap()