diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-04 10:32:49 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-04 06:01:38 +0200 |
commit | 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f (patch) | |
tree | b2d385cd55c0dbfb6d7e1644907e71474ad76d3b /tests/auto/network/access/qnetworkreply | |
parent | fe90725ced04351a11f54caff8636e4665fed396 (diff) |
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: I21664d8d92b27c26c64789fc08d0ec7b8988456a
Reviewed-on: http://codereview.qt-project.org/5941
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/network/access/qnetworkreply')
-rw-r--r-- | tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index f668930ffa..bc7ab7f24a 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -262,8 +262,10 @@ private Q_SLOTS: void ioPutToFileFromSocket(); void ioPutToFileFromLocalSocket_data(); void ioPutToFileFromLocalSocket(); +#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE) void ioPutToFileFromProcess_data(); void ioPutToFileFromProcess(); +#endif void ioPutToFtpFromFile_data(); void ioPutToFtpFromFile(); void ioPutToHttpFromFile_data(); @@ -3744,6 +3746,8 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket() QCOMPARE(contents, data); } +// Currently no stdin/out supported for Windows CE. +#if !defined(QT_NO_PROCESS) && !defined(Q_OS_WINCE) void tst_QNetworkReply::ioPutToFileFromProcess_data() { putToFile_data(); @@ -3751,19 +3755,12 @@ void tst_QNetworkReply::ioPutToFileFromProcess_data() void tst_QNetworkReply::ioPutToFileFromProcess() { -#if defined(Q_OS_WINCE) - QSKIP("Currently no stdin/out supported for Windows CE", SkipAll); -#else - #ifdef Q_OS_WIN if (qstrcmp(QTest::currentDataTag(), "small") == 0) QSKIP("When passing a CR-LF-LF sequence through Windows stdio, it gets converted, " "so this test fails. Disabled on Windows", SkipSingle); #endif -#if defined(QT_NO_PROCESS) - QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll); -#else QFile file(testFileName); QUrl url = QUrl::fromLocalFile(file.fileName()); @@ -3790,9 +3787,8 @@ void tst_QNetworkReply::ioPutToFileFromProcess() QCOMPARE(file.size(), qint64(data.size())); QByteArray contents = file.readAll(); QCOMPARE(contents, data); -#endif -#endif } +#endif void tst_QNetworkReply::ioPutToFtpFromFile_data() { |