#include #include #include #include #include #include "test_scaffold.h" #include struct channel_test : public test_scaffold { channel_test() { name = __FILE__ ":1"; } virtual int run() { auto store = std::make_unique>(); gp::buddy<> alloc{&*store->begin(), store->size()}; gp::system sys{alloc, 1}; std::atomic_int a = 0; sys.spawn(gp::function{[&](){ a.fetch_add(1); }, alloc}); sys.run_once(); gp_config::assertion(a.load(), "did not increment (aka run the fiber)"); return 0; } }; append_test dummy_hke41r43(new channel_test{});