diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-06 18:56:31 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-07 04:30:30 +0200 |
commit | 924d810dbdcd5b5b0fa860922b2487ea9062d002 (patch) | |
tree | b14117ac5b9a2d8d02a502adbd00b94ba5eef424 /tests/auto/qstyle | |
parent | 13251dcaea443d2f228fc797e54318191048e588 (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: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e
Reviewed-on: http://codereview.qt-project.org/6128
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/qstyle')
-rw-r--r-- | tests/auto/qstyle/tst_qstyle.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp index ba6d71b41d..0045dbbb52 100644 --- a/tests/auto/qstyle/tst_qstyle.cpp +++ b/tests/auto/qstyle/tst_qstyle.cpp @@ -141,8 +141,12 @@ private slots: void testCleanlooksStyle(); #endif void testMacStyle(); +#ifdef Q_OS_WINCE void testWindowsCEStyle(); +#endif +#ifdef Q_OS_WINCE_WM void testWindowsMobileStyle(); +#endif void testStyleFactory(); void testProxyStyle(); void pixelMetric(); @@ -577,25 +581,21 @@ void tst_QStyle::testCDEStyle() } #endif +#ifdef Q_OS_WINCE void tst_QStyle::testWindowsCEStyle() { -#if defined(Q_OS_WINCE) QWindowsCEStyle cstyle; testAllFunctions(&cstyle); -#else - QSKIP("No WindowsCEStyle style", SkipAll); -#endif } +#endif +#ifdef Q_OS_WINCE_WM void tst_QStyle::testWindowsMobileStyle() { -#if defined(Q_OS_WINCE_WM) QWindowsMobileStyle cstyle; testAllFunctions(&cstyle); -#else - QSKIP("No WindowsMobileStyle style", SkipAll); -#endif } +#endif // Helper class... |