summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-06 18:56:31 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-07 04:30:30 +0200
commit924d810dbdcd5b5b0fa860922b2487ea9062d002 (patch)
treeb14117ac5b9a2d8d02a502adbd00b94ba5eef424 /tests/auto/corelib/tools
parent13251dcaea443d2f228fc797e54318191048e588 (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/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index fdfc5e1f2e..fc791ec74a 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -873,10 +873,8 @@ void tst_QString::STL()
QVERIFY( !stdstr3.length() );
#endif
-//skip test if glibc is not compiled with wide character support
-#if (defined Q_CC_GNU && !defined _GLIBCPP_USE_WCHAR_T) || defined QT_NO_STL_WCHAR
- QSKIP( "Not tested without wide character support", SkipAll);
-#else
+// Skip the rest of the test if glibc is not compiled with wide character support
+#if !(defined Q_CC_GNU && !defined _GLIBCPP_USE_WCHAR_T) && !defined QT_NO_STL_WCHAR
const wchar_t arr[] = {'h', 'e', 'l', 'l', 'o', 0};
QStdWString stlStr = arr;