#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();
#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
}
#endif
-QTEST_MAIN(tst_QtConcurrentFilter)
-
-#else
-
-QTEST_NOOP_MAIN
-
#endif
+QTEST_MAIN(tst_QtConcurrentFilter)
#include "tst_qtconcurrentfilter.moc"
#include "functions.h"
-#if !defined(QT_NO_CONCURRENT_MAP)
-
Q_DECLARE_METATYPE(QVector<int>);
Q_DECLARE_METATYPE(QVector<double>);
Q_DECLARE_METATYPE(QVector<QString>);
{
Q_OBJECT
private slots:
+#ifdef QT_NO_CONCURRENT_MAP
+ void initTestCase()
+#else
void map();
void blocking_map();
void mapped();
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)
}
}
-QTEST_MAIN(tst_QtConcurrentMap)
-
-#else
-
-QTEST_NOOP_MAIN
-
#endif
+QTEST_MAIN(tst_QtConcurrentMap)
#include "tst_qtconcurrentmap.moc"