From 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 4 Oct 2011 11:51:31 +1000 Subject: Avoid using QSKIP in lieu of compile-time checks QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: Ib2025339422749cf216e87ac414a3056250bf8f9 Reviewed-on: http://codereview.qt-project.org/5942 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/auto/corelib/codecs') diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp index d1e6a95d8c..095103dd8a 100644 --- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp @@ -91,7 +91,7 @@ private slots: void codecForUtfText_data(); void codecForUtfText(); -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(QT_NO_PROCESS) void toLocal8Bit(); #endif @@ -1934,12 +1934,9 @@ void tst_QTextCodec::codecForUtfText() QVERIFY(codec == 0); } -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(QT_NO_PROCESS) void tst_QTextCodec::toLocal8Bit() { -#ifdef QT_NO_PROCESS - QSKIP("This test requires QProcess", SkipAll); -#else QProcess process; process.start("echo/echo"); QString string(QChar(0x410)); @@ -1949,7 +1946,6 @@ void tst_QTextCodec::toLocal8Bit() process.waitForFinished(); QCOMPARE(process.exitStatus(), QProcess::NormalExit); QCOMPARE(process.exitCode(), 0); -#endif } #endif -- cgit v1.2.3