TaskTree: Use DoneWith in TaskTree::runBlocking()

Instead of using ambiguous bool.
Reuse it in place of OnDone enum in tests.

Change-Id: Ie83e82d9debb88ca19f71ecab40f8ad081293f41
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-11-06 20:08:42 +01:00
parent f771faf82d
commit 0938e6cf4d
6 changed files with 155 additions and 159 deletions

View File

@@ -441,7 +441,7 @@ void tst_Async::taskTree()
};
QVERIFY(TaskTree::runBlocking(root, 1000ms));
QCOMPARE(TaskTree::runBlocking(root, 1000ms), DoneWith::Success);
QCOMPARE(value, 16);
}
@@ -577,7 +577,7 @@ void tst_Async::mapReduce()
QFETCH(double, sum);
QFETCH(QList<double>, results);
QVERIFY(TaskTree::runBlocking(root, 1000ms));
QCOMPARE(TaskTree::runBlocking(root, 1000ms), DoneWith::Success);
QCOMPARE(s_results, results);
QCOMPARE(s_sum, sum);
}