diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-04 13:23:23 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-05 06:15:00 +0200 |
commit | 253497b7446c7d723aa3bdd7152e25d6852f2604 (patch) | |
tree | e91eb9fdb94aae121fa587ab5f54f3917a6c1d55 /tests/auto/qfocusevent | |
parent | 3f88da82b1bdf79fe4c89640838b0b69c8a89d8b (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: I582732e3dd657df834f9a98fd52d7ee368f2f29b
Reviewed-on: http://codereview.qt-project.org/5946
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/qfocusevent')
-rw-r--r-- | tests/auto/qfocusevent/tst_qfocusevent.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qfocusevent/tst_qfocusevent.cpp b/tests/auto/qfocusevent/tst_qfocusevent.cpp index d295a10171..9a1d312c9f 100644 --- a/tests/auto/qfocusevent/tst_qfocusevent.cpp +++ b/tests/auto/qfocusevent/tst_qfocusevent.cpp @@ -108,7 +108,9 @@ public slots: private slots: void checkReason_Tab(); void checkReason_ShiftTab(); +#ifndef Q_OS_WIN32 void checkReason_BackTab(); +#endif void checkReason_Popup(); void checkReason_focusWidget(); void checkReason_Shortcut(); @@ -230,11 +232,10 @@ void tst_QFocusEvent::checkReason_ShiftTab() /*! In this test we verify that the Qt::KeyBacktab key is handled in a qfocusevent */ +// Backtab is not supported on Windows. +#ifndef Q_OS_WIN32 void tst_QFocusEvent::checkReason_BackTab() { -#ifdef Q_OS_WIN32 // key is not supported on Windows - QSKIP( "Backtab is not supported on Windows", SkipAll ); -#else initWidget(); QVERIFY( childFocusWidgetOne->hasFocus() ); @@ -250,8 +251,8 @@ void tst_QFocusEvent::checkReason_BackTab() QVERIFY( childFocusWidgetTwo->hasFocus() ); QCOMPARE( childFocusWidgetOne->focusOutEventReason, int(Qt::BacktabFocusReason) ); QCOMPARE( childFocusWidgetTwo->focusInEventReason, int(Qt::BacktabFocusReason) ); -#endif } +#endif void tst_QFocusEvent::checkReason_Popup() { |