diff --git a/tests/beman/execution/exec-let.test.cpp b/tests/beman/execution/exec-let.test.cpp index b6deeeeb..66e9e325 100644 --- a/tests/beman/execution/exec-let.test.cpp +++ b/tests/beman/execution/exec-let.test.cpp @@ -3,7 +3,9 @@ #include #include +#include #include +#include #include #include #include @@ -105,6 +107,11 @@ auto test_let_value_allocator() -> void { // static_assert(std::same_as); ex::sync_wait(s); } + +auto test_let_value_env() -> void { + ex::sync_wait(ex::just() | ex::let_value([] { return ex::read_env(ex::get_scheduler); }) | + ex::then([](auto s) { static_assert(ex::scheduler); })); +} } // namespace // ---------------------------------------------------------------------------- @@ -117,6 +124,7 @@ TEST(exec_let) { try { test_let_value(); test_let_value_allocator(); + test_let_value_env(); } catch (...) { // NOLINTBEGIN(cert-dcl03-c,hicpp-static-assert,misc-static-assert) ASSERT(nullptr == "let tests are not expected to throw");