diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-19 12:53:13 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-21 01:20:29 +0200 |
commit | 27f9f136f7e39b5d612bc02f7ff8778ab424c07d (patch) | |
tree | 3c72358e3d1e42fbf0c386365e76db259e180bd7 /tests/auto/network/socket | |
parent | 016cd01846539404a0eff1e3823fa2206fe2c9a9 (diff) |
Remove SkipMode parameter from QSKIP calls.
The previous commit removed SkipMode from the testlib APi. This commit
removes the parameter from all calls to QSKIP.
Task-number: QTBUG-21851, QTBUG-21652
Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/network/socket')
3 files changed, 35 insertions, 48 deletions
diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index d982666931..f96ad2781e 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -283,7 +283,7 @@ void tst_QTcpServer::dualStack() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) - QSKIP("test server proxy doesn't support ipv6", SkipSingle); + QSKIP("test server proxy doesn't support ipv6"); QFETCH(QHostAddress, bindAddress); QFETCH(bool, v4ok); QFETCH(bool, v6ok); @@ -349,9 +349,8 @@ void tst_QTcpServer::maxPendingConnections() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("With socks5 only 1 connection is allowed ever", SkipAll); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("With socks5 only 1 connection is allowed ever"); } //### sees to fail sometimes ... a timing issue with the test on windows QTcpServer server; @@ -388,9 +387,8 @@ void tst_QTcpServer::listenError() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("With socks5 we can not make hard requirements on the address or port", SkipAll); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("With socks5 we can not make hard requirements on the address or port"); } QTcpServer server; QVERIFY(!server.listen(QHostAddress("1.2.3.4"), 0)); @@ -435,9 +433,8 @@ void tst_QTcpServer::waitForConnectionTest() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("Localhost servers don't work well with SOCKS5", SkipAll); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("Localhost servers don't work well with SOCKS5"); } QTcpSocket findLocalIpSocket; @@ -533,9 +530,8 @@ void tst_QTcpServer::addressReusable() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("With socks5 this test does not make senans at the momment", SkipAll); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("With socks5 this test does not make senans at the momment"); } #if defined(Q_OS_WINCE) QString signalName = QString::fromLatin1("/test_signal.txt"); @@ -574,9 +570,8 @@ void tst_QTcpServer::setNewSocketDescriptorBlocking() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("With socks5 we can not make the socket descripter blocking", SkipAll); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("With socks5 we can not make the socket descripter blocking"); } SeverWithBlockingSockets server; QVERIFY(server.listen()); diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index 95ab719405..46f8111945 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -1040,7 +1040,7 @@ void tst_QTcpSocket::disconnectWhileConnecting() if (!data.isEmpty()) socket->write(data); if (socket->state() == QAbstractSocket::ConnectedState) - QSKIP("localhost connections are immediate, test case is invalid", SkipSingle); + QSKIP("localhost connections are immediate, test case is invalid"); QFETCH(bool, closeDirectly); if (closeDirectly) { @@ -1156,9 +1156,8 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop() socket->connectToHost("127.0.0.1", thread->serverPort); if (!data.isEmpty()) socket->write(data); - if (socket->state() == QAbstractSocket::ConnectedState) { - QSKIP("localhost connections are immediate, test case is invalid", SkipSingle); - } + if (socket->state() == QAbstractSocket::ConnectedState) + QSKIP("localhost connections are immediate, test case is invalid"); QFETCH(bool, closeDirectly); if (closeDirectly) { @@ -2224,14 +2223,14 @@ void tst_QTcpSocket::suddenRemoteDisconnect() #ifndef Q_OS_VXWORKS void tst_QTcpSocket::connectToMultiIP() { - QSKIP("TODO: setup DNS in the new network", SkipAll); + QSKIP("TODO: setup DNS in the new network"); QFETCH_GLOBAL(bool, ssl); if (ssl) return; QFETCH_GLOBAL(bool, setProxy); if (setProxy) - QSKIP("This test takes too long if we also add the proxies.", SkipSingle); + QSKIP("This test takes too long if we also add the proxies."); qDebug("Please wait, this test can take a while..."); diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index b2cbe11796..a44d724d63 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -246,9 +246,8 @@ void tst_QUdpSocket::broadcasting() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("With socks5 Broadcast is not supported.", SkipSingle); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("With socks5 Broadcast is not supported."); } const char *message[] = {"Yo mista", "", "Yo", "Wassap"}; @@ -261,7 +260,7 @@ void tst_QUdpSocket::broadcasting() } } if (broadcastAddresses.isEmpty()) - QSKIP("No interface can broadcast", SkipAll); + QSKIP("No interface can broadcast"); for (int i = 0; i < 4; ++i) { QUdpSocket serverSocket; #ifdef FORCE_SESSION @@ -432,7 +431,7 @@ void tst_QUdpSocket::dualStack() { QFETCH_GLOBAL(bool, setProxy); if (setProxy) - QSKIP("test server SOCKS proxy doesn't support IPv6", SkipSingle); + QSKIP("test server SOCKS proxy doesn't support IPv6"); QUdpSocket dualSock; QByteArray dualData("dual"); QVERIFY(dualSock.bind(QHostAddress(QHostAddress::Any), 0)); @@ -545,26 +544,23 @@ void tst_QUdpSocket::pendingDatagramSize() QCOMPARE(server.readDatagram(&c, 1), qint64(1)); QCOMPARE(c, 't'); c = '\0'; - } else { - QSKIP("does not have the 1st datagram", SkipSingle); - } + } else + QSKIP("does not have the 1st datagram"); if (server.hasPendingDatagrams()) { QCOMPARE(server.pendingDatagramSize(), qint64(0)); QCOMPARE(server.readDatagram(&c, 1), qint64(0)); QCOMPARE(c, '\0'); // untouched - c = '\0'; - } else { - QSKIP("does not have the 2nd datagram", SkipSingle); - } + c = '\0'; + } else + QSKIP("does not have the 2nd datagram"); if (server.hasPendingDatagrams()) { QCOMPARE(server.pendingDatagramSize(), qint64(10)); QCOMPARE(server.readDatagram(&c, 1), qint64(1)); QCOMPARE(c, '3'); - } else { - QSKIP("does not have the 3rd datagram", SkipSingle); - } + } else + QSKIP("does not have the 3rd datagram"); } @@ -597,7 +593,7 @@ void tst_QUdpSocket::writeDatagram() if (written != i * 1024) { #if defined (Q_OS_HPUX) - QSKIP("HP-UX 11.11 on hai (PA-RISC 64) truncates too long datagrams.", SkipSingle); + QSKIP("HP-UX 11.11 on hai (PA-RISC 64) truncates too long datagrams."); #endif QCOMPARE(bytesspy.count(), 0); QCOMPARE(errorspy.count(), 1); @@ -610,9 +606,8 @@ void tst_QUdpSocket::writeDatagram() QCOMPARE(*static_cast<const qint64 *>(bytesspy.at(0).at(0).constData()), qint64(i * 1024)); QCOMPARE(errorspy.count(), 0); - if (!server.waitForReadyRead(5000)) { - QSKIP(QString("UDP packet lost at size %1, unable to complete the test.").arg(i * 1024).toLatin1().data(), SkipSingle); - } + if (!server.waitForReadyRead(5000)) + QSKIP(QString("UDP packet lost at size %1, unable to complete the test.").arg(i * 1024).toLatin1().data()); QCOMPARE(server.pendingDatagramSize(), qint64(i * 1024)); QCOMPARE(server.readDatagram(0, 0), qint64(0)); } @@ -663,9 +658,8 @@ void tst_QUdpSocket::bindMode() QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); - if (proxyType == QNetworkProxy::Socks5Proxy) { - QSKIP("With socks5 explicit port binding is not supported.", SkipAll); - } + if (proxyType == QNetworkProxy::Socks5Proxy) + QSKIP("With socks5 explicit port binding is not supported."); } QUdpSocket socket; @@ -745,7 +739,7 @@ void tst_QUdpSocket::writeToNonExistingPeer_data() void tst_QUdpSocket::writeToNonExistingPeer() { - QSKIP("Connected-mode UDP sockets and their behaviour are erratic", SkipAll); + QSKIP("Connected-mode UDP sockets and their behaviour are erratic"); QFETCH(QHostAddress, peerAddress); quint16 peerPort = 34534; qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError"); @@ -1058,9 +1052,8 @@ void tst_QUdpSocket::multicastLeaveAfterClose() { QFETCH_GLOBAL(bool, setProxy); QFETCH(QHostAddress, groupAddress); - if (setProxy) { - QSKIP("UDP Multicast does not work with proxies", SkipAll); - } + if (setProxy) + QSKIP("UDP Multicast does not work with proxies"); QUdpSocket udpSocket; #ifdef FORCE_SESSION |