summaryrefslogtreecommitdiffstats
path: root/tests/auto/qset/tst_qset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qset/tst_qset.cpp')
-rw-r--r--tests/auto/qset/tst_qset.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qset/tst_qset.cpp b/tests/auto/qset/tst_qset.cpp
index 319cdf4..6f377f5 100644
--- a/tests/auto/qset/tst_qset.cpp
+++ b/tests/auto/qset/tst_qset.cpp
@@ -65,6 +65,7 @@ public:
private slots:
void operator_eq();
+ void swap();
void size();
void capacity();
void reserve();
@@ -145,6 +146,16 @@ void tst_QSet::operator_eq()
}
}
+void tst_QSet::swap()
+{
+ QSet<int> s1, s2;
+ s1.insert(1);
+ s2.insert(2);
+ s1.swap(s2);
+ QCOMPARE(*s1.begin(),2);
+ QCOMPARE(*s2.begin(),1);
+}
+
void tst_QSet::size()
{
QSet<int> set;