summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/tests/unit/windows
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/src/tests/unit/windows')
-rw-r--r--3rdparty/asio/src/tests/unit/windows/.gitignore21
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp5
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp (renamed from 3rdparty/asio/src/tests/unit/windows/basic_handle.cpp)11
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp5
-rw-r--r--3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp5
-rw-r--r--3rdparty/asio/src/tests/unit/windows/object_handle.cpp44
-rw-r--r--3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp26
-rw-r--r--3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp2
-rw-r--r--3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp32
-rw-r--r--3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp53
-rw-r--r--3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp26
-rw-r--r--3rdparty/asio/src/tests/unit/windows/stream_handle.cpp53
-rw-r--r--3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp26
13 files changed, 128 insertions, 181 deletions
diff --git a/3rdparty/asio/src/tests/unit/windows/.gitignore b/3rdparty/asio/src/tests/unit/windows/.gitignore
deleted file mode 100644
index d225c81cd76..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/.gitignore
+++ /dev/null
@@ -1,21 +0,0 @@
-.deps
-.dirstamp
-*.o
-*.obj
-*.exe
-*.ilk
-*.manifest
-*.pdb
-*.tds
-basic_handle
-basic_object_handle
-basic_random_access_handle
-basic_stream_handle
-object_handle
-object_handle_service
-overlapped_handle
-overlapped_ptr
-random_access_handle
-random_access_handle_service
-stream_handle
-stream_handle_service
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
index 4c27e14e488..d4d6def159a 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_object_handle.cpp
@@ -2,7 +2,7 @@
// basic_object_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -16,11 +16,10 @@
// Test that header file is self-contained.
#include "asio/windows/basic_object_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_object_handle",
+ "basic_object_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
index 572699e2cfa..62b5419c69f 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_overlapped_handle.cpp
@@ -1,8 +1,8 @@
//
-// basic_handle.cpp
-// ~~~~~~~~~~~~~~~~
+// basic_overlapped_handle.cpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -14,13 +14,12 @@
#endif // !defined(BOOST_ALL_NO_LIB)
// Test that header file is self-contained.
-#include "asio/windows/basic_handle.hpp"
+#include "asio/windows/basic_overlapped_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_handle",
+ "basic_overlapped_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
index 720cf76b749..4a2605ea335 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_random_access_handle.cpp
@@ -2,7 +2,7 @@
// basic_random_access_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -16,11 +16,10 @@
// Test that header file is self-contained.
#include "asio/windows/basic_random_access_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_random_access_handle",
+ "basic_random_access_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
index 2151dafb709..9cdf0bd5c20 100644
--- a/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/basic_stream_handle.cpp
@@ -2,7 +2,7 @@
// basic_stream_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -16,11 +16,10 @@
// Test that header file is self-contained.
#include "asio/windows/basic_stream_handle.hpp"
-#include "asio.hpp"
#include "../unit_test.hpp"
ASIO_TEST_SUITE
(
- "windows/basic_stream_handle",
+ "basic_stream_handle",
ASIO_TEST_CASE(null_test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/object_handle.cpp b/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
index 32a836ef208..0784ba9fdb7 100644
--- a/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/object_handle.cpp
@@ -2,7 +2,7 @@
// object_handle.cpp
// ~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -43,6 +43,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
archetypes::lazy_handler lazy;
asio::error_code ec;
@@ -50,27 +51,30 @@ void test()
win::object_handle handle1(ioc);
HANDLE native_handle1 = INVALID_HANDLE_VALUE;
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
win::object_handle handle2(ioc, native_handle1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- win::object_handle handle3(std::move(handle2));
-#endif // defined(ASIO_HAS_MOVE)
+ win::object_handle handle3(ioc_ex);
+ HANDLE native_handle2 = INVALID_HANDLE_VALUE;
+ win::object_handle handle4(ioc_ex, native_handle2);
+
+ win::object_handle handle5(std::move(handle4));
+
+ win::basic_object_handle<io_context::executor_type> handle6(ioc);
+ win::object_handle handle7(std::move(handle6));
// basic_object_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::object_handle(ioc);
- handle1 = std::move(handle2);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle3);
+ handle1 = std::move(handle6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = handle1.get_io_context();
- (void)ioc_ref;
-#endif !defined(ASIO_NO_DEPRECATED)
-
- io_context::executor_type ex = handle1.get_executor();
+ win::object_handle::executor_type ex = handle1.get_executor();
(void)ex;
// basic_handle functions.
@@ -79,13 +83,13 @@ void test()
= handle1.lowest_layer();
(void)lowest_layer;
- const win::object_handle& handle4 = handle1;
- const win::object_handle::lowest_layer_type& lowest_layer2
- = handle4.lowest_layer();
- (void)lowest_layer2;
+ const win::object_handle& handle8 = handle1;
+ const win::object_handle::lowest_layer_type& lowest_layer3
+ = handle8.lowest_layer();
+ (void)lowest_layer3;
- HANDLE native_handle2 = INVALID_HANDLE_VALUE;
- handle1.assign(native_handle2);
+ HANDLE native_handle4 = INVALID_HANDLE_VALUE;
+ handle1.assign(native_handle4);
bool is_open = handle1.is_open();
(void)is_open;
@@ -122,5 +126,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/object_handle",
- ASIO_TEST_CASE(windows_object_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_object_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp b/3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp
deleted file mode 100644
index 56ff1c3bde9..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/object_handle_service.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// object_handle_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/windows/object_handle_service.hpp"
-
-#include "asio.hpp"
-#include "../unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "windows/object_handle_service",
- ASIO_TEST_CASE(null_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp b/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
index fbc8fb4e88b..5cdd3da2db1 100644
--- a/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/overlapped_handle.cpp
@@ -2,7 +2,7 @@
// overlapped_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
diff --git a/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp b/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
index 261ece6f531..fda1b2cbd98 100644
--- a/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/overlapped_ptr.cpp
@@ -2,7 +2,7 @@
// overlapped_ptr.cpp
// ~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -16,6 +16,8 @@
// Test that header file is self-contained.
#include "asio/windows/overlapped_ptr.hpp"
+#include "asio/any_io_executor.hpp"
+#include "asio/executor.hpp"
#include "asio/io_context.hpp"
#include "../unit_test.hpp"
@@ -49,6 +51,10 @@ void test()
try
{
io_context ioc;
+ asio::any_io_executor ex1(ioc.get_executor());
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ asio::executor ex2(ioc.get_executor());
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
// basic_overlapped_ptr constructors.
@@ -57,6 +63,15 @@ void test()
win::overlapped_ptr ptr2(ioc, &overlapped_handler_1);
win::overlapped_ptr ptr3(ioc, overlapped_handler_2());
+ win::overlapped_ptr ptr4(ioc.get_executor(), &overlapped_handler_1);
+ win::overlapped_ptr ptr5(ioc.get_executor(), overlapped_handler_2());
+ win::overlapped_ptr ptr6(ex1, &overlapped_handler_1);
+ win::overlapped_ptr ptr7(ex1, overlapped_handler_2());
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ win::overlapped_ptr ptr8(ex2, &overlapped_handler_1);
+ win::overlapped_ptr ptr9(ex2, overlapped_handler_2());
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
// overlapped_ptr functions.
ptr1.reset();
@@ -64,11 +79,20 @@ void test()
ptr2.reset(ioc, &overlapped_handler_1);
ptr3.reset(ioc, overlapped_handler_2());
+ ptr2.reset(ioc.get_executor(), &overlapped_handler_1);
+ ptr3.reset(ioc.get_executor(), overlapped_handler_2());
+ ptr2.reset(ex1, &overlapped_handler_1);
+ ptr3.reset(ex1, overlapped_handler_2());
+#if !defined(ASIO_NO_TS_EXECUTORS)
+ ptr3.reset(ex2, &overlapped_handler_1);
+ ptr3.reset(ex2, overlapped_handler_2());
+#endif // !defined(ASIO_NO_TS_EXECUTORS)
+
OVERLAPPED* ov1 = ptr1.get();
(void)ov1;
- const win::overlapped_ptr& ptr4(ptr1);
- const OVERLAPPED* ov2 = ptr4.get();
+ const win::overlapped_ptr& ptr10(ptr1);
+ const OVERLAPPED* ov2 = ptr10.get();
(void)ov2;
OVERLAPPED* ov3 = ptr1.release();
@@ -91,5 +115,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/overlapped_ptr",
- ASIO_TEST_CASE(windows_overlapped_ptr_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_overlapped_ptr_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp b/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
index fbd88209972..613732c5128 100644
--- a/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
+++ b/3rdparty/asio/src/tests/unit/windows/random_access_handle.cpp
@@ -2,7 +2,7 @@
// random_access_handle.cpp
// ~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 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)
@@ -47,6 +47,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
asio::uint64_t offset = 0;
@@ -57,42 +58,45 @@ void test()
win::random_access_handle handle1(ioc);
HANDLE native_handle1 = INVALID_HANDLE_VALUE;
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
win::random_access_handle handle2(ioc, native_handle1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- win::random_access_handle handle3(std::move(handle2));
-#endif // defined(ASIO_HAS_MOVE)
+ win::random_access_handle handle3(ioc_ex);
+ HANDLE native_handle2 = INVALID_HANDLE_VALUE;
+ win::random_access_handle handle4(ioc_ex, native_handle2);
+
+ win::random_access_handle handle5(std::move(handle4));
+
+ win::basic_random_access_handle<io_context::executor_type> handle6(ioc);
+ win::random_access_handle handle7(std::move(handle6));
// basic_random_access_handle operators.
-#if defined(ASIO_HAS_MOVE)
handle1 = win::random_access_handle(ioc);
- handle1 = std::move(handle2);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle4);
+ handle1 = std::move(handle6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = handle1.get_io_context();
- (void)ioc_ref;
-#endif !defined(ASIO_NO_DEPRECATED)
-
- io_context::executor_type ex = handle1.get_executor();
+ windows::random_access_handle::executor_type ex = handle1.get_executor();
(void)ex;
- // basic_handle functions.
+ // basic_overlapped_handle functions.
win::random_access_handle::lowest_layer_type& lowest_layer
= handle1.lowest_layer();
(void)lowest_layer;
- const win::random_access_handle& handle4 = handle1;
+ const win::random_access_handle& handle8 = handle1;
const win::random_access_handle::lowest_layer_type& lowest_layer2
- = handle4.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer2;
- HANDLE native_handle2 = INVALID_HANDLE_VALUE;
- handle1.assign(native_handle2);
+ HANDLE native_handle3 = INVALID_HANDLE_VALUE;
+ handle1.assign(native_handle3);
bool is_open = handle1.is_open();
(void)is_open;
@@ -100,9 +104,16 @@ void test()
handle1.close();
handle1.close(ec);
- win::random_access_handle::native_handle_type native_handle3
+ win::random_access_handle::native_handle_type native_handle4
+ = handle1.release();
+ (void)native_handle4;
+ win::random_access_handle::native_handle_type native_handle5
+ = handle1.release(ec);
+ (void)native_handle5;
+
+ win::random_access_handle::native_handle_type native_handle6
= handle1.native_handle();
- (void)native_handle3;
+ (void)native_handle6;
handle1.cancel();
handle1.cancel(ec);
@@ -147,5 +158,5 @@ void test()
ASIO_TEST_SUITE
(
"windows/random_access_handle",
- ASIO_TEST_CASE(windows_random_access_handle_compile::test)
+ ASIO_COMPILE_TEST_CASE(windows_random_access_handle_compile::test)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp b/3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp
deleted file mode 100644
index 0895864d5b8..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/random_access_handle_service.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// random_access_handle_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/windows/random_access_handle_service.hpp"
-
-#include "asio.hpp"
-#include "../unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "windows/random_access_handle_service",
- ASIO_TEST_CASE(null_test)
-)
diff --git a/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp b/3rdparty/asio/src/tests/unit/windows/stream_handle.cpp
index 499ed354b04..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-2016 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)
@@ -47,6 +47,7 @@ void test()
try
{
io_context ioc;
+ const io_context::executor_type ioc_ex = ioc.get_executor();
char mutable_char_buffer[128] = "";
const char const_char_buffer[128] = "";
archetypes::lazy_handler lazy;
@@ -56,42 +57,45 @@ void test()
win::stream_handle handle1(ioc);
HANDLE native_handle1 = INVALID_HANDLE_VALUE;
+#if defined(ASIO_MSVC) && (_MSC_VER < 1910)
+ // Skip this on older MSVC due to mysterious ambiguous overload errors.
+#else
win::stream_handle handle2(ioc, native_handle1);
+#endif
-#if defined(ASIO_HAS_MOVE)
- win::stream_handle handle3(std::move(handle2));
-#endif // defined(ASIO_HAS_MOVE)
+ win::stream_handle handle3(ioc_ex);
+ HANDLE native_handle2 = INVALID_HANDLE_VALUE;
+ win::stream_handle handle4(ioc_ex, native_handle2);
+
+ win::stream_handle handle5(std::move(handle4));
+
+ 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(handle2);
-#endif // defined(ASIO_HAS_MOVE)
+ handle1 = std::move(handle4);
+ handle1 = std::move(handle6);
// basic_io_object functions.
-#if !defined(ASIO_NO_DEPRECATED)
- io_context& ioc_ref = handle1.get_io_context();
- (void)ioc_ref;
-#endif !defined(ASIO_NO_DEPRECATED)
-
- io_context::executor_type ex = handle1.get_executor();
+ windows::stream_handle::executor_type ex = handle1.get_executor();
(void)ex;
- // basic_handle functions.
+ // basic_overlapped_handle functions.
win::stream_handle::lowest_layer_type& lowest_layer
= handle1.lowest_layer();
(void)lowest_layer;
- const win::stream_handle& handle4 = handle1;
+ const win::stream_handle& handle8 = handle1;
const win::stream_handle::lowest_layer_type& lowest_layer2
- = handle4.lowest_layer();
+ = handle8.lowest_layer();
(void)lowest_layer2;
- HANDLE native_handle2 = INVALID_HANDLE_VALUE;
- handle1.assign(native_handle2);
+ HANDLE native_handle3 = INVALID_HANDLE_VALUE;
+ handle1.assign(native_handle3);
bool is_open = handle1.is_open();
(void)is_open;
@@ -99,9 +103,16 @@ void test()
handle1.close();
handle1.close(ec);
- win::stream_handle::native_handle_type native_handle3
+ win::stream_handle::native_handle_type native_handle4
+ = 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_handle3;
+ (void)native_handle6;
handle1.cancel();
handle1.cancel(ec);
@@ -140,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)
)
diff --git a/3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp b/3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp
deleted file mode 100644
index 4281ee06b4f..00000000000
--- a/3rdparty/asio/src/tests/unit/windows/stream_handle_service.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// stream_handle_service.cpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2016 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)
-//
-
-// Disable autolinking for unit tests.
-#if !defined(BOOST_ALL_NO_LIB)
-#define BOOST_ALL_NO_LIB 1
-#endif // !defined(BOOST_ALL_NO_LIB)
-
-// Test that header file is self-contained.
-#include "asio/windows/stream_handle_service.hpp"
-
-#include "asio.hpp"
-#include "../unit_test.hpp"
-
-ASIO_TEST_SUITE
-(
- "windows/stream_handle_service",
- ASIO_TEST_CASE(null_test)
-)