| 46 | }; |
| 47 | |
| 48 | void test() |
| 49 | { |
| 50 | #if defined(BOOST_ASIO_HAS_PIPE) |
| 51 | using namespace boost::asio; |
| 52 | |
| 53 | try |
| 54 | { |
| 55 | io_context ioc; |
| 56 | const io_context::executor_type ioc_ex = ioc.get_executor(); |
| 57 | char mutable_char_buffer[128] = ""; |
| 58 | const char const_char_buffer[128] = ""; |
| 59 | archetypes::lazy_handler lazy; |
| 60 | boost::system::error_code ec; |
| 61 | |
| 62 | // basic_writable_pipe constructors. |
| 63 | |
| 64 | writable_pipe pipe1(ioc); |
| 65 | writable_pipe::native_handle_type native_pipe1 = pipe1.native_handle(); |
| 66 | writable_pipe pipe2(ioc, native_pipe1); |
| 67 | |
| 68 | writable_pipe pipe3(ioc_ex); |
| 69 | writable_pipe::native_handle_type native_pipe2 = pipe1.native_handle(); |
| 70 | writable_pipe pipe4(ioc_ex, native_pipe2); |
| 71 | |
| 72 | writable_pipe pipe5(std::move(pipe4)); |
| 73 | |
| 74 | basic_writable_pipe<io_context::executor_type> pipe6(ioc); |
| 75 | writable_pipe pipe7(std::move(pipe6)); |
| 76 | |
| 77 | // basic_writable_pipe operators. |
| 78 | |
| 79 | pipe1 = writable_pipe(ioc); |
| 80 | pipe1 = std::move(pipe2); |
| 81 | pipe1 = std::move(pipe6); |
| 82 | |
| 83 | // I/O object functions. |
| 84 | |
| 85 | writable_pipe::executor_type ex = pipe1.get_executor(); |
| 86 | (void)ex; |
| 87 | |
| 88 | // basic_writable_pipe functions. |
| 89 | |
| 90 | writable_pipe::native_handle_type native_pipe3 = pipe1.native_handle(); |
| 91 | pipe1.assign(native_pipe3); |
| 92 | writable_pipe::native_handle_type native_pipe4 = pipe1.native_handle(); |
| 93 | pipe1.assign(native_pipe4, ec); |
| 94 | |
| 95 | bool is_open = pipe1.is_open(); |
| 96 | (void)is_open; |
| 97 | |
| 98 | pipe1.close(); |
| 99 | pipe1.close(ec); |
| 100 | |
| 101 | writable_pipe::native_handle_type native_pipe5 = pipe1.release(); |
| 102 | (void)native_pipe5; |
| 103 | writable_pipe::native_handle_type native_pipe6 = pipe1.release(ec); |
| 104 | (void)native_pipe6; |
| 105 |
nothing calls this directly
no test coverage detected