| 27 | { |
| 28 | public: |
| 29 | void |
| 30 | testTestStream() |
| 31 | { |
| 32 | char buf[1] = {}; |
| 33 | net::mutable_buffer m0; |
| 34 | net::mutable_buffer m1(buf, sizeof(buf)); |
| 35 | |
| 36 | { |
| 37 | net::io_context ioc; |
| 38 | |
| 39 | { |
| 40 | test::stream ts(ioc); |
| 41 | } |
| 42 | { |
| 43 | test::stream ts(ioc); |
| 44 | ts.close(); |
| 45 | } |
| 46 | { |
| 47 | test::stream t1(ioc); |
| 48 | auto t2 = connect(t1); |
| 49 | } |
| 50 | { |
| 51 | test::stream t1(ioc); |
| 52 | auto t2 = connect(t1); |
| 53 | t2.close(); |
| 54 | } |
| 55 | } |
| 56 | { |
| 57 | // abandon |
| 58 | net::io_context ioc; |
| 59 | test::stream ts(ioc); |
| 60 | ts.async_read_some(m1, |
| 61 | [](error_code, std::size_t) |
| 62 | { |
| 63 | BEAST_FAIL(); |
| 64 | }); |
| 65 | } |
| 66 | //--- |
| 67 | { |
| 68 | net::io_context ioc; |
| 69 | { |
| 70 | test::stream ts(ioc); |
| 71 | ts.async_read_some(m1, |
| 72 | test::fail_handler( |
| 73 | net::error::operation_aborted)); |
| 74 | } |
| 75 | test::run(ioc); |
| 76 | } |
| 77 | { |
| 78 | net::io_context ioc; |
| 79 | test::stream ts(ioc); |
| 80 | ts.async_read_some(m1, |
| 81 | test::fail_handler( |
| 82 | net::error::operation_aborted)); |
| 83 | ts.close(); |
| 84 | test::run(ioc); |
| 85 | } |
| 86 | { |
nothing calls this directly
no test coverage detected