Test: remove QSKIP from tst_QSocketNotifier::posixSockets
authorCaroline Chao <caroline.chao@digia.com>
Tue, 16 Oct 2012 10:32:17 +0000 (12:32 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 16 Oct 2012 18:43:37 +0000 (20:43 +0200)
Instead omit the whole test when Q_OS_UNIX is not defined.

Change-Id: If0ee3345c25f6b1baa38845edfd08ec26a45d6f2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp

index 4a0fdad..bf74584 100644 (file)
@@ -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 <tst_qsocketnotifier.moc>