diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index 6e183f3212..cdcbd19ae8 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -1863,7 +1863,7 @@ void tst_QByteArray::reserve() QCOMPARE(qba.capacity(), capacity); QCOMPARE(copy.capacity(), capacity); - copy = qba; + qba = copy; qba.reserve(capacity * 2); QCOMPARE(qba.size(), capacity); QCOMPARE(qba.capacity(), capacity * 2);