From 90259625e45c3e4cb26af3c30fffdb182d08dba1 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Mon, 15 Aug 2022 07:05:41 +0400 Subject: explicit coroutine init --- source/test/unittests/async_function.test.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/test/unittests') 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); -- cgit v1.2.3