summaryrefslogtreecommitdiff
path: root/source/test/unittests
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-15 07:05:41 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-15 07:05:41 +0400
commit90259625e45c3e4cb26af3c30fffdb182d08dba1 (patch)
treeb3dea810f1cf0408ad7ae70a13b9611494e76dd3 /source/test/unittests
parent599a87544343e386b59e1f096475c02b55fc2340 (diff)
downloadkit-90259625e45c3e4cb26af3c30fffdb182d08dba1.zip
explicit coroutine init
Diffstat (limited to 'source/test/unittests')
-rw-r--r--source/test/unittests/async_function.test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/test/unittests/async_function.test.c b/source/test/unittests/async_function.test.c
index 4fe2c60..f4571a0 100644
--- a/source/test/unittests/async_function.test.c
+++ b/source/test/unittests/async_function.test.c
@@ -84,6 +84,12 @@ TEST("coroutine init") {
REQUIRE(!AF_FINISHED(promise));
}
+TEST("coroutine init explicit") {
+ AF_TYPE(test_foo) promise;
+ AF_INIT_EXPLICIT(promise, AF_NAME(test_foo));
+ REQUIRE(!AF_FINISHED(promise));
+}
+
TEST("coroutine init with value") {
AF_TYPE(test_foo) promise;
AF_INIT(promise, test_foo, .return_value = 42);