diff options
Diffstat (limited to '3rdparty/asio/src/tests/unit/windows/stream_handle.cpp')
-rw-r--r-- | 3rdparty/asio/src/tests/unit/windows/stream_handle.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp index 6bb2d668ad8..1668dcea69a 100644 --- a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp +++ b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp @@ -2,7 +2,7 @@ // stream_handle.cpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -67,16 +67,16 @@ void test() HANDLE native_handle2 = INVALID_HANDLE_VALUE; win::stream_handle handle4(ioc_ex, native_handle2); -#if defined(ASIO_HAS_MOVE) win::stream_handle handle5(std::move(handle4)); -#endif // defined(ASIO_HAS_MOVE) + + win::basic_stream_handle<io_context::executor_type> handle6(ioc); + win::stream_handle handle7(std::move(handle6)); // basic_stream_handle operators. -#if defined(ASIO_HAS_MOVE) handle1 = win::stream_handle(ioc); handle1 = std::move(handle4); -#endif // defined(ASIO_HAS_MOVE) + handle1 = std::move(handle6); // basic_io_object functions. @@ -89,9 +89,9 @@ void test() = handle1.lowest_layer(); (void)lowest_layer; - const win::stream_handle& handle6 = handle1; + const win::stream_handle& handle8 = handle1; const win::stream_handle::lowest_layer_type& lowest_layer2 - = handle6.lowest_layer(); + = handle8.lowest_layer(); (void)lowest_layer2; HANDLE native_handle3 = INVALID_HANDLE_VALUE; @@ -104,8 +104,15 @@ void test() handle1.close(ec); win::stream_handle::native_handle_type native_handle4 - = handle1.native_handle(); + = handle1.release(); (void)native_handle4; + win::stream_handle::native_handle_type native_handle5 + = handle1.release(ec); + (void)native_handle5; + + win::stream_handle::native_handle_type native_handle6 + = handle1.native_handle(); + (void)native_handle6; handle1.cancel(); handle1.cancel(ec); @@ -144,5 +151,5 @@ void test() ASIO_TEST_SUITE ( "windows/stream_handle", - ASIO_TEST_CASE(windows_stream_handle_compile::test) + ASIO_COMPILE_TEST_CASE(windows_stream_handle_compile::test) ) |