From 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 4 Oct 2011 10:32:49 +1000 Subject: Avoid using QSKIP in lieu of compile-time checks QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I21664d8d92b27c26c64789fc08d0ec7b8988456a Reviewed-on: http://codereview.qt-project.org/5941 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp') diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index c070be9e64..d982666931 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -105,7 +105,9 @@ private slots: void waitForConnectionTest(); void setSocketDescriptor(); void listenWhileListening(); +#ifndef QT_NO_PROCESS void addressReusable(); +#endif void setNewSocketDescriptorBlocking(); void invalidProxy_data(); void invalidProxy(); @@ -525,12 +527,9 @@ protected: } }; +#ifndef QT_NO_PROCESS void tst_QTcpServer::addressReusable() { -#if defined(QT_NO_PROCESS) - QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll); -#else - QFETCH_GLOBAL(bool, setProxy); if (setProxy) { QFETCH_GLOBAL(int, proxyType); @@ -567,8 +566,8 @@ void tst_QTcpServer::addressReusable() QTcpServer server; QVERIFY(server.listen(QHostAddress::LocalHost, 49199)); -#endif } +#endif void tst_QTcpServer::setNewSocketDescriptorBlocking() { -- cgit v1.2.3