summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp9
1 files 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 4a0fdad97c..bf745841c0 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 <tst_qsocketnotifier.moc>