From 924d810dbdcd5b5b0fa860922b2487ea9062d002 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 6 Oct 2011 18:56:31 +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: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e Reviewed-on: http://codereview.qt-project.org/6128 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- .../socket/platformsocketengine/tst_platformsocketengine.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp') diff --git a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp index 1b74d2ec55..f3aae4b09e 100644 --- a/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp +++ b/tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp @@ -656,12 +656,8 @@ void tst_PlatformSocketEngine::receiveUrgentData() int available; QByteArray response; -#if defined Q_OS_HPUX - QSKIP("Native OOB data test doesn't work on HP-UX.", SkipAll); -#elif defined (Q_OS_WINCE) - QSKIP("Native OOB data test doesn't work on WinCE.", SkipAll); -#endif - + // Native OOB data test doesn't work on HP-UX or WinCE +#if !defined(Q_OS_HPUX) && !defined(Q_OS_WINCE) // The server sends an urgent message msg = 'Q'; QCOMPARE(int(::send(socketDescriptor, &msg, sizeof(msg), MSG_OOB)), 1); @@ -686,6 +682,7 @@ void tst_PlatformSocketEngine::receiveUrgentData() response.resize(available); QCOMPARE(serverSocket.read(response.data(), response.size()), qint64(1)); QCOMPARE(response.at(0), msg); +#endif } QTEST_MAIN(tst_PlatformSocketEngine) -- cgit v1.2.3