| 414 | } |
| 415 | |
| 416 | void system_timer_move_test() |
| 417 | { |
| 418 | boost::asio::io_context io_context1; |
| 419 | boost::asio::io_context io_context2; |
| 420 | int count = 0; |
| 421 | |
| 422 | boost::asio::system_timer t1 = make_timer(io_context1, &count); |
| 423 | boost::asio::system_timer t2 = make_timer(io_context2, &count); |
| 424 | boost::asio::system_timer t3 = std::move(t1); |
| 425 | |
| 426 | t2 = std::move(t1); |
| 427 | |
| 428 | io_context2.run(); |
| 429 | |
| 430 | BOOST_ASIO_CHECK(count == 1); |
| 431 | |
| 432 | io_context1.run(); |
| 433 | |
| 434 | BOOST_ASIO_CHECK(count == 2); |
| 435 | |
| 436 | boost::asio::system_timer t4 = make_convertible_timer(io_context1, &count); |
| 437 | boost::asio::system_timer t5 = make_convertible_timer(io_context2, &count); |
| 438 | boost::asio::system_timer t6 = std::move(t4); |
| 439 | |
| 440 | t2 = std::move(t4); |
| 441 | |
| 442 | io_context2.restart(); |
| 443 | io_context2.run(); |
| 444 | |
| 445 | BOOST_ASIO_CHECK(count == 3); |
| 446 | |
| 447 | io_context1.restart(); |
| 448 | io_context1.run(); |
| 449 | |
| 450 | BOOST_ASIO_CHECK(count == 4); |
| 451 | } |
| 452 | |
| 453 | void system_timer_op_cancel_test() |
| 454 | { |
nothing calls this directly
no test coverage detected