diff options
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp | 6 | ||||
-rw-r--r-- | tests/auto/corelib/tools/qstring/tst_qstring.cpp | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index 5f036f37fe..dc0c8905fd 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -1536,6 +1536,12 @@ void tst_QByteArray::reserve() QVERIFY(capacity == qba.capacity()); QVERIFY(data == qba.data()); } + + QByteArray nil1, nil2; + nil1.reserve(0); + nil2.squeeze(); + nil1.squeeze(); + nil2.reserve(0); } void tst_QByteArray::literals() diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 5ef8d70ef6..dc5070c9c2 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -224,6 +224,8 @@ private slots: void toUpperLower_icu(); void literals(); + + void reserve(); }; typedef QList<int> IntList; @@ -5137,6 +5139,14 @@ void tst_QString::literals() #endif } +void tst_QString::reserve() +{ + QString nil1, nil2; + nil1.reserve(0); + nil2.squeeze(); + nil1.squeeze(); + nil2.reserve(0); +} QTEST_APPLESS_MAIN(tst_QString) |