From cd582f841076010dac334427830763838c0996b8 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Mon, 2 Sep 2013 21:00:14 +0300 Subject: Add QT_NO_PROCESS guards in tests where they are missing A handful of tests lack QT_NO_PROCESS guards, making them non-compilable on Qt builds with no QProcess support. This commit does not change QProcess-specific tests, which should be left out of the build using the .pro file mechanism. Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12 Reviewed-by: Friedemann Kleint --- .../corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp') diff --git a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp index 79ab212d47..3ee5b3fcce 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp @@ -430,6 +430,9 @@ void tst_QCommandLineParser::testSingleDashWordOptionModes() void tst_QCommandLineParser::testVersionOption() { +#ifdef QT_NO_PROCESS + QSKIP("This test requires QProcess support"); +#else #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE"); #endif @@ -443,6 +446,7 @@ void tst_QCommandLineParser::testVersionOption() output.replace(QStringLiteral("\r\n"), QStringLiteral("\n")); #endif QCOMPARE(output, QString("qcommandlineparser_test_helper 1.0\n")); +#endif // !QT_NO_PROCESS } void tst_QCommandLineParser::testHelpOption_data() @@ -478,6 +482,9 @@ void tst_QCommandLineParser::testHelpOption_data() void tst_QCommandLineParser::testHelpOption() { +#ifdef QT_NO_PROCESS + QSKIP("This test requires QProcess support"); +#else #ifdef Q_OS_WINCE QSKIP("Reading and writing to a process is not supported on Qt/CE"); #endif @@ -524,6 +531,7 @@ void tst_QCommandLineParser::testHelpOption() expectedResizeHelp.replace("testhelper/", "testhelper\\"); #endif QCOMPARE(output, QString(expectedResizeHelp)); +#endif // !QT_NO_PROCESS } QTEST_APPLESS_MAIN(tst_QCommandLineParser) -- cgit v1.2.3