diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-10 10:40:29 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-10 10:40:29 (GMT) |
commit | a2418eed6e4e5aabe1274c57c7fc279a66fa2333 (patch) | |
tree | 50c6955e0c1bf6a2d9e7fa0dfa0e19e90744e253 | |
parent | 92da536d5b704b97cb322535424e7bbefd722867 (diff) | |
parent | bbfefe1b764cd41b7e677f26621fb6e76a67f9d7 (diff) | |
download | Qt-a2418eed6e4e5aabe1274c57c7fc279a66fa2333.zip Qt-a2418eed6e4e5aabe1274c57c7fc279a66fa2333.tar.gz Qt-a2418eed6e4e5aabe1274c57c7fc279a66fa2333.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team:
Remove Q_ASSERT's from QNetworkReply autotest
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index b5bbd84..610ca1f 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -739,7 +739,9 @@ public: QTcpSocket* waitForNextConnectionSocket() { waitForNewConnection(-1); if (doSsl) { - Q_ASSERT(sslSocket); + if (!sslSocket) + qFatal("%s: sslSocket should not be null after calling waitForNewConnection()", + Q_FUNC_INFO); return sslSocket; } else { //qDebug() << "returning nextPendingConnection"; @@ -911,7 +913,8 @@ protected: while (dataIndex < wantedSize) { const int remainingBytes = wantedSize - measuredSentBytes; const int bytesToWrite = qMin(remainingBytes, static_cast<int>(BlockSize)); - Q_ASSERT(bytesToWrite); + if (bytesToWrite <= 0) + qFatal("%s: attempt to write %d bytes", Q_FUNC_INFO, bytesToWrite); measuredSentBytes += writeNextData(client, bytesToWrite); while (client->bytesToWrite() > 0) { @@ -970,7 +973,8 @@ public: // Wait for data to be readyRead bool ok = connect(&senderObj, SIGNAL(dataReady()), this, SLOT(slotDataReady())); - Q_ASSERT(ok); + if (!ok) + qFatal("%s: Cannot connect dataReady signal", Q_FUNC_INFO); } void wrapUp() @@ -993,9 +997,9 @@ protected: void timerEvent(QTimerEvent *) { //qDebug() << "RateControlledReader: timerEvent bytesAvailable=" << device->bytesAvailable(); - if (readBufferSize > 0) { - // This asserts passes all the time, except in the final flush. - //Q_ASSERT(device->bytesAvailable() <= readBufferSize); + if (readBufferSize > 0 && device->bytesAvailable() > readBufferSize) { + // This passes all the time, except in the final flush. + //qFatal("%s: Too many bytes available", Q_FUNC_INFO); } qint64 bytesRead = 0; @@ -1122,7 +1126,7 @@ QString tst_QNetworkReply::runSimpleRequest(QNetworkAccessManager::Operation op, break; default: - Q_ASSERT_X(false, "tst_QNetworkReply", "Invalid/unknown operation requested"); + qFatal("%s: Invalid/unknown operation requested", Q_FUNC_INFO); } reply->setParent(this); |