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 <jpnurmi@digia.com>
This commit is contained in:
Caroline Chao 2012-10-16 12:32:17 +02:00 committed by The Qt Project
parent 18a3ebe4e5
commit fdc9ce5908

View 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>