diff options
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/qt_poll/qt_poll.pro | 5 | ||||
-rw-r--r-- | tests/manual/qt_poll/tst_qt_poll.cpp | 15 |
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/manual/qt_poll/qt_poll.pro b/tests/manual/qt_poll/qt_poll.pro index e8104c764b..beea4d1316 100644 --- a/tests/manual/qt_poll/qt_poll.pro +++ b/tests/manual/qt_poll/qt_poll.pro @@ -1,4 +1,7 @@ CONFIG += testcase TARGET = tst_qt_poll QT = core-private network testlib -SOURCES = tst_qt_poll.cpp +INCLUDEPATH += ../../../src/corelib/kernel +SOURCES += \ + tst_qt_poll.cpp \ + ../../../src/corelib/kernel/qpoll.cpp diff --git a/tests/manual/qt_poll/tst_qt_poll.cpp b/tests/manual/qt_poll/tst_qt_poll.cpp index 1edc08244e..56e41e4093 100644 --- a/tests/manual/qt_poll/tst_qt_poll.cpp +++ b/tests/manual/qt_poll/tst_qt_poll.cpp @@ -31,33 +31,31 @@ ** ****************************************************************************/ +#ifndef QT_NO_NATIVE_POLL +#define QT_NO_NATIVE_POLL +#endif + #include <QtTest/QtTest> #include <QtNetwork> #include <private/qcore_unix_p.h> -#ifdef QT_BUILD_INTERNAL QT_BEGIN_NAMESPACE -Q_AUTOTEST_EXPORT int qt_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts); +// defined in qpoll.cpp +int qt_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts); QT_END_NAMESPACE -#endif // QT_BUILD_INTERNAL - -QT_USE_NAMESPACE class tst_qt_poll : public QObject { Q_OBJECT -#ifdef QT_BUILD_INTERNAL private slots: void pollout(); void pollin(); void pollnval(); void pollprihup(); -#endif // QT_BUILD_INTERNAL }; -#ifdef QT_BUILD_INTERNAL void tst_qt_poll::pollout() { int fds[2]; @@ -152,7 +150,6 @@ void tst_qt_poll::pollprihup() QCOMPARE(res, 1); QCOMPARE(pfd.revents, short(POLLHUP)); } -#endif // QT_BUILD_INTERNAL QTEST_APPLESS_MAIN(tst_qt_poll) #include "tst_qt_poll.moc" |