diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-10 06:56:35 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-10 06:56:35 (GMT) |
commit | f61ec84fc296c6f70011e30788ee511d6b6a18c6 (patch) | |
tree | 54b3b81ac83570e65dc9b44b6756005f6ba1efde /tests/auto/qlocalsocket | |
parent | cc0a411e5e874aa224c26298a109973cb15ea291 (diff) | |
parent | d13418effc5f00474541ae513a30c9a42c2a1cb3 (diff) | |
download | Qt-f61ec84fc296c6f70011e30788ee511d6b6a18c6.zip Qt-f61ec84fc296c6f70011e30788ee511d6b6a18c6.tar.gz Qt-f61ec84fc296c6f70011e30788ee511d6b6a18c6.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
src/corelib/kernel/qobject.cpp
src/corelib/tools/qsharedpointer_impl.h
src/gui/widgets/qdatetimeedit.cpp
src/gui/widgets/qlinecontrol.cpp
src/gui/widgets/qlineedit.cpp
tests/auto/qcssparser/qcssparser.pro
tests/auto/qicoimageformat/tst_qicoimageformat.cpp
tests/auto/qmultiscreen/qmultiscreen.pro
tests/auto/qresourceengine/qresourceengine.pro
tests/auto/qresourceengine/tst_qresourceengine.cpp
tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
Diffstat (limited to 'tests/auto/qlocalsocket')
-rw-r--r-- | tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index d1daf00..e414655 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -582,14 +582,17 @@ void tst_QLocalSocket::readBufferOverflow() QVERIFY(server.hasPendingConnections()); QLocalSocket* serverSocket = server.nextPendingConnection(); - char* buffer = (char*)qMalloc(dataBufferSize); + char buffer[dataBufferSize]; memset(buffer, 0, dataBufferSize); serverSocket->write(buffer, dataBufferSize); serverSocket->flush(); - qFree(buffer); QVERIFY(client.waitForReadyRead()); - QCOMPARE(client.readAll().size(), dataBufferSize); + QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize)); +#ifdef QT_LOCALSOCKET_TCP + QTest::qWait(250); +#endif + QCOMPARE(client.read(buffer, readBufferSize), qint64(readBufferSize)); } // QLocalSocket/Server can take a name or path, check that it works as expected @@ -971,6 +974,7 @@ void tst_QLocalSocket::writeOnlySocket() QVERIFY(server.waitForNewConnection()); QLocalSocket* serverSocket = server.nextPendingConnection(); + QVERIFY(serverSocket); QCOMPARE(client.bytesAvailable(), qint64(0)); QCOMPARE(client.state(), QLocalSocket::ConnectedState); |