From 4a981b9bdb6d512ac077ecdeaf478fc9a5792d17 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Thu, 8 Oct 2020 12:12:07 +0200 Subject: [PATCH] Enable some-of the QtConcurrent test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QtConcurrent::filtered test-cases for move-only containers were failing to compile, because it is assumed that the passed container should have value_type defined. Change-Id: I3e9e5ebc07704cb98a15b125ae8bd5b5a84d497a Reviewed-by: Andreas Buhr Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Andrei Golubev --- .../qtconcurrentfilter/tst_qtconcurrentfilter.cpp | 15 +++++++-------- tests/auto/concurrent/qtconcurrentmap/functions.h | 2 ++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp index c7ab64c14c2..53b1b0fb552 100644 --- a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp +++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp @@ -231,19 +231,18 @@ void tst_QtConcurrentFilter::filtered() QCOMPARE(result, std::vector({ 2, 4 })); } -#if 0 - // does not work yet { // move only types sequences - auto future = QtConcurrent::filtered( - MoveOnlyVector({ 1, 2, 3, 4 }), keepEvenIntegers); + auto future = QtConcurrent::filtered(MoveOnlyVector({ 1, 2, 3, 4 }), keepEvenIntegers); QCOMPARE(future.results(), QList({ 2, 4 })); +#if 0 + // does not work yet auto result = QtConcurrent::blockingFiltered( MoveOnlyVector({ 1, 2, 3, 4 }), keepEvenIntegers); QCOMPARE(result, std::vector({ 2, 4 })); - } #endif + } } template ({ 2, 4 })); } -#if 0 - // does not work yet { // move-only sequences auto future = QtConcurrent::filtered( &pool, MoveOnlyVector({ 1, 2, 3, 4 }), keepEvenIntegers); QCOMPARE(future.results(), QList({ 2, 4 })); +#if 0 + // does not work yet auto result = QtConcurrent::blockingFiltered( &pool, MoveOnlyVector({ 1, 2, 3, 4 }), keepEvenIntegers); QCOMPARE(result, std::vector({ 2, 4 })); - } #endif + } } template