diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-04 11:51:31 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-05 03:04:31 +0200 |
commit | 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 (patch) | |
tree | 5df8fca668dace17eea7b6c5ed82db8e87180105 /tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp | |
parent | c46f59fadf63b661d8611e5896f09fb85c17a00c (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: Ib2025339422749cf216e87ac414a3056250bf8f9
Reviewed-on: http://codereview.qt-project.org/5942
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp')
-rw-r--r-- | tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp index 970784c5d3..b292b3857d 100644 --- a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp +++ b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp @@ -58,7 +58,9 @@ private slots: void resultAt(); void incrementalResults(); void noDetatch(); +#ifndef QT_NO_STL void stlContainers(); +#endif }; #if !defined (QT_NO_CONCURRENT_TEST) && !defined(QT_NO_CONCURRENT_FILTER) @@ -1497,11 +1499,10 @@ void tst_QtConcurrentFilter::noDetatch() } } +#ifndef QT_NO_STL void tst_QtConcurrentFilter::stlContainers() { -#if defined(QT_NO_STL) - QSKIP("Qt compiled without STL support", SkipAll); -#elif defined(_MSC_VER) && _MSC_VER >= 1600 +#if defined(_MSC_VER) && _MSC_VER >= 1600 QSKIP("Test does not compile with MSVC 2010 (see QTBUG-18996)", SkipAll); #else std::vector<int> vector; @@ -1529,6 +1530,7 @@ void tst_QtConcurrentFilter::stlContainers() QCOMPARE(*list2.begin(), 1); #endif } +#endif QTEST_MAIN(tst_QtConcurrentFilter) |