summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbitarray/tst_qbitarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qbitarray/tst_qbitarray.cpp')
-rw-r--r--tests/auto/qbitarray/tst_qbitarray.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qbitarray/tst_qbitarray.cpp b/tests/auto/qbitarray/tst_qbitarray.cpp
index 30f4f58..7b9543e 100644
--- a/tests/auto/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/qbitarray/tst_qbitarray.cpp
@@ -88,6 +88,7 @@ private slots:
void countBits();
void countBits2();
void isEmpty();
+ void swap();
void fill();
void toggleBit_data();
void toggleBit();
@@ -269,6 +270,14 @@ void tst_QBitArray::isEmpty()
QVERIFY(a1.size() == 2);
}
+void tst_QBitArray::swap()
+{
+ QBitArray b1 = QStringToQBitArray("1"), b2 = QStringToQBitArray("10");
+ b1.swap(b2);
+ QCOMPARE(b1,QStringToQBitArray("10"));
+ QCOMPARE(b2,QStringToQBitArray("1"));
+}
+
void tst_QBitArray::fill()
{
int N = 64;