@@ -70,28 +70,18 @@ TEST_F(WhenAllTest, single_branch) {
7070 Kokkos::Execution::ExecutionSpaceImpl::Domain
7171 >);
7272
73- // / Even though the sender returned by @c stdexec::when_all is in the customized domain,
74- // / it does not have a completion scheduler and so it is not an execution space completing sender.
75- static_assert (!Kokkos::Execution::ExecutionSpaceImpl::execution_space_completing_sender<decltype (sndr)>);
73+ // / After the implementation of P4269R0 in https://github.com/NVIDIA/stdexec/pull/2124,
74+ // / when_all(s) with a single sender is expression-equivalent to auto(s).
75+ static_assert (std::same_as<stdexec::tag_of_t <decltype (sndr)>, stdexec::then_t >);
76+ static_assert (Kokkos::Execution::ExecutionSpaceImpl::execution_space_completing_sender<decltype (sndr)>);
7677
7778 ASSERT_EQ (data (), 0 ) << " Eager execution is not allowed." ;
7879
79- const auto recorded_events = Tests::Utils::record_sync_wait<recorder_listener_t >(std::move (sndr));
80-
81- // / Because the sender returned by @c stdexec::when_all is not an execution space completing sender,
82- // / the default implementation of @c stdexec::sync_wait is used.
83- ASSERT_THAT (recorded_events, [&]() {
84- if constexpr (Kokkos::Execution::Impl::has_non_blocking_dispatch<TEST_EXECUTION_SPACE >) {
85- return testing::ElementsAre (
86- MATCHER_FOR_BEGIN_PFOR (exec, dispatch_label (exec, " then" )),
87- MATCHER_FOR_RECORD_EVENT (exec),
88- MATCHER_FOR_WAIT_EVENT (recorded_events.at (1 )));
89- } else {
90- return testing::ElementsAre (
91- MATCHER_FOR_BEGIN_PFOR (exec, dispatch_label (exec, " then" )),
92- MATCHER_FOR_BEGIN_FENCE (exec, dispatch_label (exec, " after dispatch" )));
93- }
94- }());
80+ ASSERT_THAT (
81+ Tests::Utils::record_sync_wait<recorder_listener_t >(std::move (sndr)),
82+ testing::ElementsAre (
83+ MATCHER_FOR_BEGIN_PFOR (exec, dispatch_label (exec, " then" )),
84+ MATCHER_FOR_BEGIN_FENCE (exec, dispatch_label (exec, " sync_wait" ))));
9585
9686 ASSERT_EQ (data (), 1 );
9787}
0 commit comments