From fdc9ce5908ee47f9f5adac2d49899a4de887ccd5 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Tue, 16 Oct 2012 12:32:17 +0200 Subject: [PATCH] Test: remove QSKIP from tst_QSocketNotifier::posixSockets Instead omit the whole test when Q_OS_UNIX is not defined. Change-Id: If0ee3345c25f6b1baa38845edfd08ec26a45d6f2 Reviewed-by: J-P Nurmi --- .../auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index 4a0fdad..bf74584 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -67,7 +67,9 @@ class tst_QSocketNotifier : public QObject private slots: void unexpectedDisconnection(); void mixingWithTimers(); +#ifdef Q_OS_UNIX void posixSockets(); +#endif }; class UnexpectedDisconnectTester : public QObject @@ -240,11 +242,10 @@ void tst_QSocketNotifier::mixingWithTimers() QTRY_COMPARE(helper.socketActivated, true); } +#ifdef Q_OS_UNIX +// test only for posix void tst_QSocketNotifier::posixSockets() { -#ifndef Q_OS_UNIX - QSKIP("test only for posix"); -#else QTcpServer server; QVERIFY(server.listen(QHostAddress::LocalHost, 0)); @@ -299,8 +300,8 @@ void tst_QSocketNotifier::posixSockets() QCOMPARE(passive->readAll(), QByteArray("goodbye",8)); } qt_safe_close(posixSocket); -#endif } +#endif QTEST_MAIN(tst_QSocketNotifier) #include -- 2.7.4