diff options
Diffstat (limited to 'tests/auto/qtextstream/tst_qtextstream.cpp')
-rw-r--r-- | tests/auto/qtextstream/tst_qtextstream.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/auto/qtextstream/tst_qtextstream.cpp b/tests/auto/qtextstream/tst_qtextstream.cpp index d05dcf8..484d7c9 100644 --- a/tests/auto/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/qtextstream/tst_qtextstream.cpp @@ -41,7 +41,7 @@ /*-*-encoding:latin1-*-*/ -#include <iostream> +//#include <iostream> //using namespace std; #include <QtTest/QtTest> @@ -76,6 +76,10 @@ QT_END_NAMESPACE //TESTED_CLASS= //TESTED_FILES= +#ifdef Q_OS_SYMBIAN +#define SRCDIR "" +#endif + class tst_QTextStream : public QObject { Q_OBJECT @@ -472,7 +476,7 @@ tst_QTextStream::tst_QTextStream() } tst_QTextStream::~tst_QTextStream() -{ +{ } void tst_QTextStream::init() @@ -1247,7 +1251,11 @@ void tst_QTextStream::stillOpenWhenAtEnd() #endif QTcpSocket socket; socket.connectToHost(QtNetworkSettings::serverName(), 143); +#if defined(Q_OS_SYMBIAN) + QVERIFY(socket.waitForReadyRead(30000)); +#else QVERIFY(socket.waitForReadyRead(5000)); +#endif QTextStream stream2(&socket); while (!stream2.readLine().isNull()) {} @@ -1490,8 +1498,8 @@ void tst_QTextStream::pos2() // ------------------------------------------------------------------------------ void tst_QTextStream::readStdin() { -#ifdef Q_OS_WINCE - QSKIP("Qt/CE has no stdin/out", SkipAll); +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll); #endif QProcess stdinProcess; stdinProcess.start("stdinProcess/stdinProcess"); @@ -1516,8 +1524,8 @@ void tst_QTextStream::readStdin() // ------------------------------------------------------------------------------ void tst_QTextStream::readAllFromStdin() { -#ifdef Q_OS_WINCE - QSKIP("Qt/CE has no stdin/out", SkipAll); +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll); #endif QProcess stdinProcess; stdinProcess.start("readAllStdinProcess/readAllStdinProcess", QIODevice::ReadWrite | QIODevice::Text); @@ -1537,8 +1545,8 @@ void tst_QTextStream::readAllFromStdin() // ------------------------------------------------------------------------------ void tst_QTextStream::readLineFromStdin() { -#ifdef Q_OS_WINCE - QSKIP("Qt/CE has no stdin/out", SkipAll); +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) + QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll); #endif QProcess stdinProcess; stdinProcess.start("readLineStdinProcess/readLineStdinProcess", QIODevice::ReadWrite | QIODevice::Text); @@ -4298,7 +4306,7 @@ void tst_QTextStream::int_write_with_locale() // like QTEST_APPLESS_MAIN, but initialising the locale on Unix int main(int argc, char *argv[]) { -#ifdef Q_OS_UNIX +#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN) extern bool qt_locale_initialized; ::setlocale(LC_ALL, ""); qt_locale_initialized = true; |