| 131 | } |
| 132 | |
| 133 | void run_task_test() |
| 134 | { |
| 135 | boost::asio::io_context ctx; |
| 136 | |
| 137 | bool tt1 = false; |
| 138 | bool tt2 = false; |
| 139 | bool tt3 = false; |
| 140 | bool tt4 = false; |
| 141 | auto tt = task_test(ctx); |
| 142 | tt.async_resume( |
| 143 | [&](std::exception_ptr pt, int i) |
| 144 | { |
| 145 | tt1 = true; |
| 146 | BOOST_ASIO_CHECK(!pt); |
| 147 | BOOST_ASIO_CHECK(i == 42); |
| 148 | tt.async_resume( |
| 149 | [&](std::exception_ptr pt, int) |
| 150 | { |
| 151 | tt2 = true; |
| 152 | BOOST_ASIO_CHECK(pt); |
| 153 | }); |
| 154 | }); |
| 155 | |
| 156 | auto tt_2 = task_throw(ctx); |
| 157 | |
| 158 | tt_2.async_resume( |
| 159 | [&](std::exception_ptr pt, int) |
| 160 | { |
| 161 | tt3 = true; |
| 162 | BOOST_ASIO_CHECK(pt); |
| 163 | tt.async_resume( |
| 164 | [&](std::exception_ptr pt, int) |
| 165 | { |
| 166 | tt4 = true; |
| 167 | BOOST_ASIO_CHECK(pt); |
| 168 | }); |
| 169 | }); |
| 170 | |
| 171 | ctx.run(); |
| 172 | |
| 173 | BOOST_ASIO_CHECK(tt1); |
| 174 | BOOST_ASIO_CHECK(tt2); |
| 175 | BOOST_ASIO_CHECK(tt3); |
| 176 | BOOST_ASIO_CHECK(tt4); |
| 177 | } |
| 178 | |
| 179 | boost::asio::experimental::coro<char> completion_generator_test_impl( |
| 180 | boost::asio::any_io_executor, int limit) |
nothing calls this directly
no test coverage detected