summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-24 15:47:02 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-31 04:29:33 +0000
commit57dbdcd92fdee7ae5eaafcba880739b58404ec4e (patch)
tree6ab89f56faabac7601aa494c524287da6810ceb1 /tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
parentcc7fcecd7ad3c2d7dcf9d93ba4d7018b9cd111b3 (diff)
tests/auto/network: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Icaa1edafcc6e2779fbd6dbc2c058544d6e07f1e9 Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp')
-rw-r--r--tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
index 8de9987ed1..5b27b7d2b4 100644
--- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
@@ -223,7 +223,7 @@ void tst_QUdpSocket::constructing()
QVERIFY(socket.isSequential());
QVERIFY(!socket.isOpen());
- QVERIFY(socket.socketType() == QUdpSocket::UdpSocket);
+ QCOMPARE(socket.socketType(), QUdpSocket::UdpSocket);
QCOMPARE((int) socket.bytesAvailable(), 0);
QCOMPARE(socket.canReadLine(), false);
QCOMPARE(socket.readLine(), QByteArray());
@@ -749,7 +749,7 @@ void tst_QUdpSocket::writeDatagram()
QCOMPARE(client.error(), QUdpSocket::DatagramTooLargeError);
break;
}
- QVERIFY(bytesspy.count() == 1);
+ QCOMPARE(bytesspy.count(), 1);
QCOMPARE(*static_cast<const qint64 *>(bytesspy.at(0).at(0).constData()),
qint64(i * 1024));
QCOMPARE(errorspy.count(), 0);