From f6e3d9d6956b30c90a3f98ebcce57014538d48f7 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 17 Oct 2011 14:50:39 +1000 Subject: 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 --- .../qtconcurrentmap/tst_qtconcurrentmap.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tests/auto/corelib/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp') 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); Q_DECLARE_METATYPE(QVector); Q_DECLARE_METATYPE(QVector); @@ -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" -- cgit v1.2.3