MCPcopy Create free account
hub / github.com/boostorg/asio / coroutine_using_async_ops_0

Function coroutine_using_async_ops_0

test/spawn.cpp:227–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227int coroutine_using_async_ops_0(boost::asio::yield_context yield)
228{
229 using namespace archetypes;
230
231 try
232 {
233 async_op_0(yield);
234 }
235 catch (...)
236 {
237 BOOST_ASIO_CHECK(false);
238 }
239
240 try
241 {
242 async_op_ec_0(true, yield);
243 }
244 catch (...)
245 {
246 BOOST_ASIO_CHECK(false);
247 }
248
249 try
250 {
251 async_op_ec_0(false, yield);
252 BOOST_ASIO_CHECK(false);
253 }
254 catch (boost::system::system_error& e)
255 {
256 BOOST_ASIO_CHECK(e.code() == boost::asio::error::operation_aborted);
257 }
258 catch (...)
259 {
260 BOOST_ASIO_CHECK(false);
261 }
262
263 try
264 {
265 async_op_ex_0(true, yield);
266 }
267 catch (...)
268 {
269 BOOST_ASIO_CHECK(false);
270 }
271
272 try
273 {
274 async_op_ex_0(false, yield);
275 BOOST_ASIO_CHECK(false);
276 }
277 catch (std::exception& e)
278 {
279 BOOST_ASIO_CHECK(e.what() == std::string("blah"));
280 }
281 catch (...)
282 {
283 BOOST_ASIO_CHECK(false);
284 }

Callers

nothing calls this directly

Calls 5

async_op_0Function · 0.85
async_op_ec_0Function · 0.85
async_op_ex_0Function · 0.85
stringFunction · 0.85
codeMethod · 0.80

Tested by

no test coverage detected