tst_QPromise: complete the port to RUN_TEST_FUNC

When we consolidated "all" test functions to use RUN_TEST_FUNC, the
cancel() test function was inexplicably overlooked.

This patch ports this last test function.

Amends 4c00337ccb8e4266fa5a4af4fba40e5b62aba81b, whose commit message
contains rationale for this change, but not repeated here.

Pick-to: 6.8 6.5 6.2
Change-Id: I9461f8e816a25c731d6229df15ee88dcc8c4e165
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
Marc Mutz 2024-11-08 23:00:09 +01:00
parent 3a94084bc7
commit 3e71f256d5

View File

@ -404,10 +404,10 @@ void tst_QPromise::cancel()
QCOMPARE(promise.isCanceled(), true);
};
testCancel(QPromise<void>());
testCancel(QPromise<int>());
testCancel(QPromise<CopyOnlyType>());
testCancel(QPromise<MoveOnlyType>());
RUN_TEST_FUNC(testCancel, QPromise<void>());
RUN_TEST_FUNC(testCancel, QPromise<int>());
RUN_TEST_FUNC(testCancel, QPromise<CopyOnlyType>());
RUN_TEST_FUNC(testCancel, QPromise<MoveOnlyType>());
}
void tst_QPromise::progress()