summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/concurrent
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-17 14:50:39 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-18 03:09:44 +0200
commitf6e3d9d6956b30c90a3f98ebcce57014538d48f7 (patch)
tree64bbb993fc7bf7d854a94e62977ad118e60226c4 /tests/auto/corelib/concurrent
parentbe9939ac8988deb17cf0f2c29bed6b3e0fbbcf40 (diff)
Prefer QSKIP to QTEST_NOOP_MAIN.
Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that these tests aren't testing anything when the required defines are not defined. Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/concurrent')
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp21
-rw-r--r--tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp21
2 files changed, 26 insertions, 16 deletions
diff --git a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 0aa3be938f..42ab8b5fc9 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -46,13 +46,14 @@
#include "../qtconcurrentmap/functions.h"
-#if !defined(QT_NO_CONCURRENT_FILTER)
-
class tst_QtConcurrentFilter : public QObject
{
Q_OBJECT
private slots:
+#ifdef QT_NO_CONCURRENT_FILTER
+ void initTestCase();
+#else
void filter();
void filtered();
void filteredReduced();
@@ -62,8 +63,17 @@ private slots:
#ifndef QT_NO_STL
void stlContainers();
#endif
+#endif
};
+#ifdef QT_NO_CONCURRENT_FILTER
+void tst_QtConcurrentFilter::initTestCase()
+{
+ QSKIP("This test is skipped for gcc 3.x", SkipAll);
+}
+
+#else
+
void tst_QtConcurrentFilter::filter()
{
// functor
@@ -1531,12 +1541,7 @@ void tst_QtConcurrentFilter::stlContainers()
}
#endif
-QTEST_MAIN(tst_QtConcurrentFilter)
-
-#else
-
-QTEST_NOOP_MAIN
-
#endif
+QTEST_MAIN(tst_QtConcurrentFilter)
#include "tst_qtconcurrentfilter.moc"
diff --git a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 330e6b908e..a4634e0c8f 100644
--- a/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -48,8 +48,6 @@
#include "functions.h"
-#if !defined(QT_NO_CONCURRENT_MAP)
-
Q_DECLARE_METATYPE(QVector<int>);
Q_DECLARE_METATYPE(QVector<double>);
Q_DECLARE_METATYPE(QVector<QString>);
@@ -61,6 +59,9 @@ class tst_QtConcurrentMap: public QObject
{
Q_OBJECT
private slots:
+#ifdef QT_NO_CONCURRENT_MAP
+ void initTestCase()
+#else
void map();
void blocking_map();
void mapped();
@@ -81,8 +82,17 @@ private slots:
void stressTest();
public slots:
void throttling();
+#endif
};
+#ifdef QT_NO_CONCURRENT_FILTER
+void tst_QtConcurrentFilter::initTestCase()
+{
+ QSKIP("This test is skipped for gcc 3.x", SkipAll);
+}
+
+#else
+
using namespace QtConcurrent;
void multiplyBy2Immutable(int x)
@@ -2415,12 +2425,7 @@ void tst_QtConcurrentMap::stressTest()
}
}
-QTEST_MAIN(tst_QtConcurrentMap)
-
-#else
-
-QTEST_NOOP_MAIN
-
#endif
+QTEST_MAIN(tst_QtConcurrentMap)
#include "tst_qtconcurrentmap.moc"