diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-06 11:46:15 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-10-06 11:46:49 (GMT) |
commit | 83b4cad278e2c3b0ca16affc76a82ddce9d6149a (patch) | |
tree | bebee452460a8a2f0562bf90dd24070b5033df48 /tests/auto/qtcpsocket | |
parent | ccd3f663c8c96e266b173a6f825bccec830007e1 (diff) | |
download | Qt-83b4cad278e2c3b0ca16affc76a82ddce9d6149a.zip Qt-83b4cad278e2c3b0ca16affc76a82ddce9d6149a.tar.gz Qt-83b4cad278e2c3b0ca16affc76a82ddce9d6149a.tar.bz2 |
tst_qtcpserver: Another attempt to reproduce QTBUG-14268
The test (un)fortunately passes :-)
Task-number: QTBUG-14268
Diffstat (limited to 'tests/auto/qtcpsocket')
-rw-r--r-- | tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index 5b77006..2dbe5b7 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -2505,6 +2505,7 @@ void tst_QTcpSocket::proxyFactory() delete socket; } +// there is a similar test inside tst_qtcpserver that uses the event loop instead void tst_QTcpSocket::qtbug14268_peek() { QFETCH_GLOBAL(bool, setProxy); @@ -2519,22 +2520,22 @@ void tst_QTcpSocket::qtbug14268_peek() QVERIFY(incoming->state() == QTcpSocket::ConnectedState); QVERIFY(outgoing->state() == QTcpSocket::ConnectedState); - outgoing->write("abc"); + outgoing->write("abc\n"); QVERIFY(outgoing->waitForBytesWritten(2000)); QVERIFY(incoming->waitForReadyRead(2000)); - QVERIFY(incoming->peek(128*1024) == QByteArray("abc")); + QVERIFY(incoming->peek(128*1024) == QByteArray("abc\n")); - outgoing->write("def"); + outgoing->write("def\n"); QVERIFY(outgoing->waitForBytesWritten(2000)); QVERIFY(incoming->waitForReadyRead(2000)); - QVERIFY(incoming->peek(128*1024) == QByteArray("abcdef")); + QVERIFY(incoming->peek(128*1024) == QByteArray("abc\ndef\n")); - outgoing->write("ghi"); + outgoing->write("ghi\n"); QVERIFY(outgoing->waitForBytesWritten(2000)); QVERIFY(incoming->waitForReadyRead(2000)); - QVERIFY(incoming->peek(128*1024) == QByteArray("abcdefghi")); + QVERIFY(incoming->peek(128*1024) == QByteArray("abc\ndef\nghi\n")); - QVERIFY(incoming->read(128*1024) == QByteArray("abcdefghi")); + QVERIFY(incoming->read(128*1024) == QByteArray("abc\ndef\nghi\n")); } |