summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp')
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
index 67259c04dc..e90f4ff14e 100644
--- a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
@@ -1606,7 +1606,9 @@ void tst_QByteArray::resizeAfterFromRawData()
QByteArray array = QByteArray::fromRawData(buffer.constData(), buffer.size());
QVERIFY(array.constData() == buffer.constData());
array.resize(5);
- QVERIFY(array.constData() == buffer.constData());
+ QVERIFY(array.constData() != buffer.constData());
+ // check null termination
+ QVERIFY(array.constData()[5] == 0);
}
void tst_QByteArray::appendAfterFromRawData()