summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-05-28 16:41:49 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-06-03 15:14:42 +0200
commite4079eca49adce16e31dac2a18d49d7a55817891 (patch)
tree1dfb960ec1115b1f552afe8a013058542389505e /tests/auto/concurrent
parentf32a6cfb6b6236533508901f114ab57396da8ff3 (diff)
parentec6dc5f78453048c4f0604655a34c6c20c79d819 (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Diffstat (limited to 'tests/auto/concurrent')
-rw-r--r--tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
index 8506d18dae..39d17e0a24 100644
--- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
+++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp
@@ -710,14 +710,12 @@ void tst_QtConcurrentRun::lambda()
QCOMPARE(QtConcurrent::run([](int a, double b){ return a + b; }, 12, 15).result(), double(12+15));
QCOMPARE(QtConcurrent::run([](int a , int, int, int, int b){ return a + b; }, 1, 2, 3, 4, 5).result(), 1 + 5);
-#ifdef Q_COMPILER_INITIALIZER_LISTS
{
QString str { "Hello World Foo" };
QFuture<QStringList> f1 = QtConcurrent::run([&](){ return str.split(' '); });
auto r = f1.result();
QCOMPARE(r, QStringList({"Hello", "World", "Foo"}));
}
-#endif
// and now with explicit pool:
QThreadPool pool;
@@ -726,14 +724,12 @@ void tst_QtConcurrentRun::lambda()
QCOMPARE(QtConcurrent::run(&pool, [](int a, double b){ return a + b; }, 12, 15).result(), double(12+15));
QCOMPARE(QtConcurrent::run(&pool, [](int a , int, int, int, int b){ return a + b; }, 1, 2, 3, 4, 5).result(), 1 + 5);
-#ifdef Q_COMPILER_INITIALIZER_LISTS
{
QString str { "Hello World Foo" };
QFuture<QStringList> f1 = QtConcurrent::run(&pool, [&](){ return str.split(' '); });
auto r = f1.result();
QCOMPARE(r, QStringList({"Hello", "World", "Foo"}));
}
-#endif
}
QTEST_MAIN(tst_QtConcurrentRun)