kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
test_check_rcvr_env.cpp
Go to the documentation of this file.
1
#include "gtest/gtest.h"
2
3
#include "
tests/utils/check_rcvr_env.hpp
"
4
15
16
namespace
Tests
{
17
18
constexpr
struct
PropA
:
public
::stdexec::__query<PropA> {
19
}
prop_a
{};
20
21
constexpr
struct
PropB
:
public
::stdexec::__query<PropB> {
22
}
prop_b
{};
23
24
consteval
auto
get_sndr
() {
25
using
expected_env_t = stdexec::env<
26
const
stdexec::prop<Tests::PropA, double>&,
27
stdexec::__env::__fwd<stdexec::env<
28
const
stdexec::__env::__fwd<stdexec::prop<Tests::PropB, double>>&,
29
stdexec::__env::__fwd<stdexec::__sync_wait::__env>
30
>>
31
>;
32
33
return
stdexec::just() |
Tests::Utils::check_rcvr_env<expected_env_t>
()
34
| stdexec::write_env(stdexec::prop{
prop_a
, 42.}) | stdexec::then([]() { })
35
| stdexec::write_env(stdexec::__fwd_env(stdexec::prop{
prop_b
, 666.}));
36
}
37
39
TEST(check_rcvr_env, rvalue) {
40
stdexec::sync_wait(
get_sndr
());
41
}
42
44
TEST(check_rcvr_env, lvalue) {
45
auto
sndr =
get_sndr
();
46
stdexec::sync_wait(sndr);
47
}
48
49
}
// namespace Tests
check_rcvr_env.hpp
Tests::Utils::check_rcvr_env
constexpr check_rcvr_env_t< ExpectedEnv > check_rcvr_env
Definition
check_rcvr_env.hpp:50
Tests
Definition
test_any_sender.cpp:39
Tests::get_sndr
consteval auto get_sndr()
Definition
test_check_rcvr_env.cpp:24
Tests::prop_a
Tests::PropA prop_a
Tests::prop_b
Tests::PropB prop_b
Tests::PropA
Definition
test_check_rcvr_env.cpp:18
Tests::PropB
Definition
test_check_rcvr_env.cpp:21
tests
utils
test_check_rcvr_env.cpp
Generated on
for kokkos-execution by
1.18.0