diff options
Diffstat (limited to 'tests/auto/qbytearray/tst_qbytearray.cpp')
-rw-r--r-- | tests/auto/qbytearray/tst_qbytearray.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 0dc2282fcd..c291c6afb7 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -71,6 +71,7 @@ public slots: void init(); void cleanup(); private slots: + void swap(); void qCompress_data(); #ifndef QT_NO_COMPRESS void qCompress(); @@ -453,6 +454,14 @@ void tst_QByteArray::split() QCOMPARE(list.count(), size); } +void tst_QByteArray::swap() +{ + QByteArray b1 = "b1", b2 = "b2"; + b1.swap(b2); + QCOMPARE(b1, QByteArray("b2")); + QCOMPARE(b2, QByteArray("b1")); +} + void tst_QByteArray::base64_data() { QTest::addColumn<QByteArray>("rawdata"); |