diff options
author | David Boddie <dboddie@trolltech.com> | 2010-03-30 14:56:41 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-03-30 14:56:41 (GMT) |
commit | 87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3 (patch) | |
tree | f8b8c24056d54e19937dea1b0301af558597726a /tests/auto/qbytearray/tst_qbytearray.cpp | |
parent | 09ce407aaa4a00013a606bf0011faf6cbc654c72 (diff) | |
parent | 00f7426f3906361fb5addb36e428648eee5e2983 (diff) | |
download | Qt-87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3.zip Qt-87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3.tar.gz Qt-87f66d52e362de003a9f2cdaafbfbe3ba4e5fbc3.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Conflicts:
doc/src/modules.qdoc
mkspecs/common/symbian/symbian.conf
src/gui/graphicsview/qgraphicswidget.h
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'tests/auto/qbytearray/tst_qbytearray.cpp')
-rw-r--r-- | tests/auto/qbytearray/tst_qbytearray.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qbytearray/tst_qbytearray.cpp b/tests/auto/qbytearray/tst_qbytearray.cpp index 5c72c7a..07fdbc3 100644 --- a/tests/auto/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/qbytearray/tst_qbytearray.cpp @@ -111,6 +111,7 @@ private slots: void remove(); void replace_data(); void replace(); + void replaceWithSpecifiedLength(); void indexOf_data(); void indexOf(); void lastIndexOf_data(); @@ -840,6 +841,18 @@ void tst_QByteArray::replace() QCOMPARE(str2.replace(pos, len, after.data()), expected); } +void tst_QByteArray::replaceWithSpecifiedLength() +{ + const char after[] = "zxc\0vbnmqwert"; + int lenAfter = 6; + QByteArray ba("abcdefghjk"); + ba.replace(0,2,after,lenAfter); + + const char _expected[] = "zxc\0vbcdefghjk"; + QByteArray expected(_expected,sizeof(_expected)-1); + QCOMPARE(ba,expected); +} + void tst_QByteArray::indexOf_data() { QTest::addColumn<QByteArray>("haystack"); |