Skip to content

Commit 4bf21ad

Browse files
committed
add a regression test for #1929
1 parent dfd29d1 commit 4bf21ad

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

test/exec/test_type_async_scope.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,20 @@ namespace
130130
// Verify the program finishes without crashing
131131
}
132132
}
133+
134+
#if !STDEXEC_NO_STDCPP_COROUTINES()
135+
template <typename AsyncScope>
136+
::STDEXEC::task<void> test_awaitable_in_stdexec_task(AsyncScope& scope)
137+
{
138+
co_await scope.on_empty();
139+
}
140+
141+
TEST_CASE("Can await async_scope on_empty operation from a stdexec task",
142+
"[types][type_async_scope]")
143+
{
144+
exec::async_scope scope;
145+
CHECK_NOTHROW(test_awaitable_in_stdexec_task(scope));
146+
}
147+
#endif // !STDEXEC_NO_STDCPP_COROUTINES()
148+
133149
} // namespace

0 commit comments

Comments
 (0)