diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /libs/asio/test | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/asio/test')
118 files changed, 294 insertions, 217 deletions
diff --git a/libs/asio/test/Jamfile b/libs/asio/test/Jamfile index a5e9ea56b..75be325c1 100644 --- a/libs/asio/test/Jamfile +++ b/libs/asio/test/Jamfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +# Copyright (c) 2003-2015 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) @@ -26,7 +26,6 @@ if $(UNIX) template asio_unit_test : <lib>@boost/libs/regex/build/boost_regex - <lib>@boost/libs/test/build/boost_test_exec_monitor <lib>@boost_system/libs/system/build/boost_system : <include>../../.. <include>@boost <include>@boost_system <define>BOOST_ALL_NO_LIB=1 diff --git a/libs/asio/test/Jamfile.v2 b/libs/asio/test/Jamfile.v2 index b48b528be..8dc0a39f5 100644 --- a/libs/asio/test/Jamfile.v2 +++ b/libs/asio/test/Jamfile.v2 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +# Copyright (c) 2003-2015 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) @@ -39,7 +39,6 @@ project <library>/boost/date_time//boost_date_time <library>/boost/system//boost_system <library>/boost/regex//boost_regex - <library>/boost/test//boost_test_exec_monitor <define>BOOST_ALL_NO_LIB=1 <threading>multi <os>LINUX:<define>_XOPEN_SOURCE=600 diff --git a/libs/asio/test/archetypes/async_result.hpp b/libs/asio/test/archetypes/async_result.hpp index f9808836c..ab0b5f340 100644 --- a/libs/asio/test/archetypes/async_result.hpp +++ b/libs/asio/test/archetypes/async_result.hpp @@ -2,7 +2,7 @@ // async_result.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/archetypes/gettable_socket_option.hpp b/libs/asio/test/archetypes/gettable_socket_option.hpp index 80406af64..b4130687f 100644 --- a/libs/asio/test/archetypes/gettable_socket_option.hpp +++ b/libs/asio/test/archetypes/gettable_socket_option.hpp @@ -2,7 +2,7 @@ // gettable_socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/archetypes/io_control_command.hpp b/libs/asio/test/archetypes/io_control_command.hpp index 4c24763a1..9538d749b 100644 --- a/libs/asio/test/archetypes/io_control_command.hpp +++ b/libs/asio/test/archetypes/io_control_command.hpp @@ -2,7 +2,7 @@ // io_control_command.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/archetypes/settable_socket_option.hpp b/libs/asio/test/archetypes/settable_socket_option.hpp index 48d04c557..0c4a28c74 100644 --- a/libs/asio/test/archetypes/settable_socket_option.hpp +++ b/libs/asio/test/archetypes/settable_socket_option.hpp @@ -2,7 +2,7 @@ // settable_socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_datagram_socket.cpp b/libs/asio/test/basic_datagram_socket.cpp index 39bbad894..4859abee0 100644 --- a/libs/asio/test/basic_datagram_socket.cpp +++ b/libs/asio/test/basic_datagram_socket.cpp @@ -2,7 +2,7 @@ // basic_datagram_socket.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_deadline_timer.cpp b/libs/asio/test/basic_deadline_timer.cpp index b56508e5a..8d5ed35c7 100644 --- a/libs/asio/test/basic_deadline_timer.cpp +++ b/libs/asio/test/basic_deadline_timer.cpp @@ -2,7 +2,7 @@ // basic_deadline_timer.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_raw_socket.cpp b/libs/asio/test/basic_raw_socket.cpp index 7aa3630b9..eb3d8fdba 100644 --- a/libs/asio/test/basic_raw_socket.cpp +++ b/libs/asio/test/basic_raw_socket.cpp @@ -2,7 +2,7 @@ // basic_raw_socket.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_seq_packet_socket.cpp b/libs/asio/test/basic_seq_packet_socket.cpp index cc41cae04..ffbc337ad 100644 --- a/libs/asio/test/basic_seq_packet_socket.cpp +++ b/libs/asio/test/basic_seq_packet_socket.cpp @@ -2,7 +2,7 @@ // basic_seq_packet_socket.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_serial_port.cpp b/libs/asio/test/basic_serial_port.cpp index 47383f515..02d502569 100644 --- a/libs/asio/test/basic_serial_port.cpp +++ b/libs/asio/test/basic_serial_port.cpp @@ -2,7 +2,7 @@ // basic_serial_port.cpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/libs/asio/test/basic_signal_set.cpp b/libs/asio/test/basic_signal_set.cpp index 1ffb46f58..f2119fede 100644 --- a/libs/asio/test/basic_signal_set.cpp +++ b/libs/asio/test/basic_signal_set.cpp @@ -2,7 +2,7 @@ // basic_signal_set.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_socket_acceptor.cpp b/libs/asio/test/basic_socket_acceptor.cpp index 319a7b479..e0ab2151a 100644 --- a/libs/asio/test/basic_socket_acceptor.cpp +++ b/libs/asio/test/basic_socket_acceptor.cpp @@ -2,7 +2,7 @@ // basic_socket_acceptor.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_stream_socket.cpp b/libs/asio/test/basic_stream_socket.cpp index 7921a3016..2e0d4b0de 100644 --- a/libs/asio/test/basic_stream_socket.cpp +++ b/libs/asio/test/basic_stream_socket.cpp @@ -2,7 +2,7 @@ // basic_stream_socket.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_streambuf.cpp b/libs/asio/test/basic_streambuf.cpp index 68659fa84..655263d3c 100644 --- a/libs/asio/test/basic_streambuf.cpp +++ b/libs/asio/test/basic_streambuf.cpp @@ -2,7 +2,7 @@ // basic_streambuf.cpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/basic_waitable_timer.cpp b/libs/asio/test/basic_waitable_timer.cpp index 252df3946..bd31311e9 100644 --- a/libs/asio/test/basic_waitable_timer.cpp +++ b/libs/asio/test/basic_waitable_timer.cpp @@ -2,7 +2,7 @@ // basic_waitable_timer.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/buffer.cpp b/libs/asio/test/buffer.cpp index cf91c00b0..0e3972855 100644 --- a/libs/asio/test/buffer.cpp +++ b/libs/asio/test/buffer.cpp @@ -2,7 +2,7 @@ // buffer.cpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/buffered_read_stream.cpp b/libs/asio/test/buffered_read_stream.cpp index 20daf602d..aa6522923 100644 --- a/libs/asio/test/buffered_read_stream.cpp +++ b/libs/asio/test/buffered_read_stream.cpp @@ -2,7 +2,7 @@ // buffered_read_stream.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/buffered_stream.cpp b/libs/asio/test/buffered_stream.cpp index de41104c5..320998034 100644 --- a/libs/asio/test/buffered_stream.cpp +++ b/libs/asio/test/buffered_stream.cpp @@ -2,7 +2,7 @@ // buffered_stream.cpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/buffered_write_stream.cpp b/libs/asio/test/buffered_write_stream.cpp index ed210ac15..be75edeb3 100644 --- a/libs/asio/test/buffered_write_stream.cpp +++ b/libs/asio/test/buffered_write_stream.cpp @@ -2,7 +2,7 @@ // buffered_write_stream.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/buffers_iterator.cpp b/libs/asio/test/buffers_iterator.cpp index 5b94790b4..038033fcb 100644 --- a/libs/asio/test/buffers_iterator.cpp +++ b/libs/asio/test/buffers_iterator.cpp @@ -2,7 +2,7 @@ // buffers_iterator.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/completion_condition.cpp b/libs/asio/test/completion_condition.cpp index 80e072e46..c0aaec40e 100644 --- a/libs/asio/test/completion_condition.cpp +++ b/libs/asio/test/completion_condition.cpp @@ -2,7 +2,7 @@ // completion_condition.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/connect.cpp b/libs/asio/test/connect.cpp index 2b57cc728..2a4859caf 100644 --- a/libs/asio/test/connect.cpp +++ b/libs/asio/test/connect.cpp @@ -2,7 +2,7 @@ // connect.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/coroutine.cpp b/libs/asio/test/coroutine.cpp index f4c5c5e26..e33498854 100644 --- a/libs/asio/test/coroutine.cpp +++ b/libs/asio/test/coroutine.cpp @@ -2,7 +2,7 @@ // coroutine.cpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/datagram_socket_service.cpp b/libs/asio/test/datagram_socket_service.cpp index f3b6c3d68..c0a680b0a 100644 --- a/libs/asio/test/datagram_socket_service.cpp +++ b/libs/asio/test/datagram_socket_service.cpp @@ -2,7 +2,7 @@ // datagram_socket_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/deadline_timer.cpp b/libs/asio/test/deadline_timer.cpp index 9d03709d3..d7c4097cd 100644 --- a/libs/asio/test/deadline_timer.cpp +++ b/libs/asio/test/deadline_timer.cpp @@ -2,7 +2,7 @@ // deadline_timer.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/deadline_timer_service.cpp b/libs/asio/test/deadline_timer_service.cpp index e533de6ab..b1799a76b 100644 --- a/libs/asio/test/deadline_timer_service.cpp +++ b/libs/asio/test/deadline_timer_service.cpp @@ -2,7 +2,7 @@ // deadline_timer_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/error.cpp b/libs/asio/test/error.cpp index 0f0c391a1..cde0c786c 100644 --- a/libs/asio/test/error.cpp +++ b/libs/asio/test/error.cpp @@ -2,7 +2,7 @@ // error.cpp // ~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/generic/basic_endpoint.cpp b/libs/asio/test/generic/basic_endpoint.cpp index 8cef40c33..107187099 100644 --- a/libs/asio/test/generic/basic_endpoint.cpp +++ b/libs/asio/test/generic/basic_endpoint.cpp @@ -2,7 +2,7 @@ // generic/basic_endpoint.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/generic/datagram_protocol.cpp b/libs/asio/test/generic/datagram_protocol.cpp index f61736c92..62daeb8bf 100644 --- a/libs/asio/test/generic/datagram_protocol.cpp +++ b/libs/asio/test/generic/datagram_protocol.cpp @@ -2,7 +2,7 @@ // generic/datagram_protocol.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -73,7 +73,8 @@ void test() dp::socket socket2(ios, dp(af_inet, ipproto_udp)); dp::socket socket3(ios, dp::endpoint()); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(af_inet, sock_dgram, 0); + dp::socket::native_handle_type native_socket1 + = ::socket(af_inet, sock_dgram, 0); dp::socket socket4(ios, dp(af_inet, ipproto_udp), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -105,9 +106,11 @@ void test() socket1.open(dp(af_inet, ipproto_udp), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(af_inet, sock_dgram, 0); + dp::socket::native_handle_type native_socket2 + = ::socket(af_inet, sock_dgram, 0); socket1.assign(dp(af_inet, ipproto_udp), native_socket2); - int native_socket3 = ::socket(af_inet, sock_dgram, 0); + dp::socket::native_handle_type native_socket3 + = ::socket(af_inet, sock_dgram, 0); socket1.assign(dp(af_inet, ipproto_udp), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/generic/raw_protocol.cpp b/libs/asio/test/generic/raw_protocol.cpp index b3afbc9d3..aff174978 100644 --- a/libs/asio/test/generic/raw_protocol.cpp +++ b/libs/asio/test/generic/raw_protocol.cpp @@ -2,7 +2,7 @@ // generic/raw_protocol.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -73,7 +73,8 @@ void test() rp::socket socket2(ios, rp(af_inet, ipproto_icmp)); rp::socket socket3(ios, rp::endpoint()); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(af_inet, sock_raw, 0); + rp::socket::native_handle_type native_socket1 + = ::socket(af_inet, sock_raw, 0); rp::socket socket4(ios, rp(af_inet, ipproto_icmp), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -105,9 +106,11 @@ void test() socket1.open(rp(af_inet, ipproto_icmp), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(af_inet, sock_raw, 0); + rp::socket::native_handle_type native_socket2 + = ::socket(af_inet, sock_raw, 0); socket1.assign(rp(af_inet, ipproto_icmp), native_socket2); - int native_socket3 = ::socket(af_inet, sock_raw, 0); + rp::socket::native_handle_type native_socket3 + = ::socket(af_inet, sock_raw, 0); socket1.assign(rp(af_inet, ipproto_icmp), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/generic/seq_packet_protocol.cpp b/libs/asio/test/generic/seq_packet_protocol.cpp index c32d2b8b1..8f126e032 100644 --- a/libs/asio/test/generic/seq_packet_protocol.cpp +++ b/libs/asio/test/generic/seq_packet_protocol.cpp @@ -2,7 +2,7 @@ // generic/seq_packet_protocol.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -72,7 +72,8 @@ void test() spp::socket socket2(ios, spp(af_inet, 0)); spp::socket socket3(ios, spp::endpoint()); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(af_inet, sock_seqpacket, 0); + spp::socket::native_handle_type native_socket1 + = ::socket(af_inet, sock_seqpacket, 0); spp::socket socket4(ios, spp(af_inet, 0), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -101,9 +102,11 @@ void test() socket1.open(spp(af_inet, 0), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(af_inet, sock_seqpacket, 0); + spp::socket::native_handle_type native_socket2 + = ::socket(af_inet, sock_seqpacket, 0); socket1.assign(spp(af_inet, 0), native_socket2); - int native_socket3 = ::socket(af_inet, sock_seqpacket, 0); + spp::socket::native_handle_type native_socket3 + = ::socket(af_inet, sock_seqpacket, 0); socket1.assign(spp(af_inet, 0), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/generic/stream_protocol.cpp b/libs/asio/test/generic/stream_protocol.cpp index ec89e95ac..40720ac8c 100644 --- a/libs/asio/test/generic/stream_protocol.cpp +++ b/libs/asio/test/generic/stream_protocol.cpp @@ -2,7 +2,7 @@ // generic/stream_protocol.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -83,7 +83,8 @@ void test() #if defined(BOOST_ASIO_WINDOWS_RUNTIME) Windows::Networking::Sockets::StreamSocket^ native_socket1 = nullptr; #else // defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(af_inet, sock_stream, 0); + sp::socket::native_handle_type native_socket1 + = ::socket(af_inet, sock_stream, 0); #endif // defined(BOOST_ASIO_WINDOWS_RUNTIME) sp::socket socket4(ios, sp(af_inet, ipproto_tcp), native_socket1); @@ -117,13 +118,15 @@ void test() #if defined(BOOST_ASIO_WINDOWS_RUNTIME) Windows::Networking::Sockets::StreamSocket^ native_socket2 = nullptr; #else // defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(af_inet, sock_stream, 0); + sp::socket::native_handle_type native_socket2 + = ::socket(af_inet, sock_stream, 0); #endif // defined(BOOST_ASIO_WINDOWS_RUNTIME) socket1.assign(sp(af_inet, ipproto_tcp), native_socket2); #if defined(BOOST_ASIO_WINDOWS_RUNTIME) Windows::Networking::Sockets::StreamSocket^ native_socket3 = nullptr; #else // defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket3 = ::socket(af_inet, sock_stream, 0); + sp::socket::native_handle_type native_socket3 + = ::socket(af_inet, sock_stream, 0); #endif // defined(BOOST_ASIO_WINDOWS_RUNTIME) socket1.assign(sp(af_inet, ipproto_tcp), native_socket3, ec); diff --git a/libs/asio/test/high_resolution_timer.cpp b/libs/asio/test/high_resolution_timer.cpp index 75eaf313f..402dd89a4 100644 --- a/libs/asio/test/high_resolution_timer.cpp +++ b/libs/asio/test/high_resolution_timer.cpp @@ -2,7 +2,7 @@ // high_resolution_timer.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/io_service.cpp b/libs/asio/test/io_service.cpp index d221b28b7..03baf8e04 100644 --- a/libs/asio/test/io_service.cpp +++ b/libs/asio/test/io_service.cpp @@ -2,7 +2,7 @@ // io_service.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/address.cpp b/libs/asio/test/ip/address.cpp index ca183f8fd..2ebc18a8d 100644 --- a/libs/asio/test/ip/address.cpp +++ b/libs/asio/test/ip/address.cpp @@ -2,7 +2,7 @@ // address.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/address_v4.cpp b/libs/asio/test/ip/address_v4.cpp index 80ab8d8c6..3e74e1ec8 100644 --- a/libs/asio/test/ip/address_v4.cpp +++ b/libs/asio/test/ip/address_v4.cpp @@ -2,7 +2,7 @@ // address_v4.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/address_v6.cpp b/libs/asio/test/ip/address_v6.cpp index a955698c6..089859212 100644 --- a/libs/asio/test/ip/address_v6.cpp +++ b/libs/asio/test/ip/address_v6.cpp @@ -2,7 +2,7 @@ // address_v6.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/basic_endpoint.cpp b/libs/asio/test/ip/basic_endpoint.cpp index 635ab9e20..51adb4b7b 100644 --- a/libs/asio/test/ip/basic_endpoint.cpp +++ b/libs/asio/test/ip/basic_endpoint.cpp @@ -2,7 +2,7 @@ // basic_endpoint.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/basic_resolver.cpp b/libs/asio/test/ip/basic_resolver.cpp index e882bb454..1aa293547 100644 --- a/libs/asio/test/ip/basic_resolver.cpp +++ b/libs/asio/test/ip/basic_resolver.cpp @@ -2,7 +2,7 @@ // basic_resolver.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/basic_resolver_entry.cpp b/libs/asio/test/ip/basic_resolver_entry.cpp index b82ae30ff..2f7864ccb 100644 --- a/libs/asio/test/ip/basic_resolver_entry.cpp +++ b/libs/asio/test/ip/basic_resolver_entry.cpp @@ -2,7 +2,7 @@ // basic_resolver_entry.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/basic_resolver_iterator.cpp b/libs/asio/test/ip/basic_resolver_iterator.cpp index d886e8e64..d69648cc1 100644 --- a/libs/asio/test/ip/basic_resolver_iterator.cpp +++ b/libs/asio/test/ip/basic_resolver_iterator.cpp @@ -2,7 +2,7 @@ // basic_resolver_iterator.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/basic_resolver_query.cpp b/libs/asio/test/ip/basic_resolver_query.cpp index 78886ea78..1d28827f8 100644 --- a/libs/asio/test/ip/basic_resolver_query.cpp +++ b/libs/asio/test/ip/basic_resolver_query.cpp @@ -2,7 +2,7 @@ // basic_resolver_query.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/host_name.cpp b/libs/asio/test/ip/host_name.cpp index 89eba06c7..2c46b29df 100644 --- a/libs/asio/test/ip/host_name.cpp +++ b/libs/asio/test/ip/host_name.cpp @@ -2,7 +2,7 @@ // host_name.cpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/icmp.cpp b/libs/asio/test/ip/icmp.cpp index e2cc35035..cebe8e3b1 100644 --- a/libs/asio/test/ip/icmp.cpp +++ b/libs/asio/test/ip/icmp.cpp @@ -2,7 +2,7 @@ // icmp.cpp // ~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -75,7 +75,8 @@ void test() ip::icmp::socket socket4(ios, ip::icmp::endpoint(ip::icmp::v4(), 0)); ip::icmp::socket socket5(ios, ip::icmp::endpoint(ip::icmp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::icmp::socket::native_handle_type native_socket1 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ip::icmp::socket socket6(ios, ip::icmp::v4(), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -111,9 +112,11 @@ void test() socket1.open(ip::icmp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::icmp::socket::native_handle_type native_socket2 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::icmp::v4(), native_socket2); - int native_socket3 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::icmp::socket::native_handle_type native_socket3 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::icmp::v4(), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/ip/multicast.cpp b/libs/asio/test/ip/multicast.cpp index b5be1c276..faa894499 100644 --- a/libs/asio/test/ip/multicast.cpp +++ b/libs/asio/test/ip/multicast.cpp @@ -2,7 +2,7 @@ // multicast.cpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -169,30 +169,34 @@ void test() { ip::multicast::join_group join_group(multicast_address_v4); sock_v4.set_option(join_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + BOOST_ASIO_CHECK_MESSAGE(!ec || ec == error::no_such_device, + ec.value() << ", " << ec.message()); + + if (!ec) + { + // leave_group class. + + ip::multicast::leave_group leave_group(multicast_address_v4); + sock_v4.set_option(leave_group, ec); + BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + } } if (have_v6) { ip::multicast::join_group join_group(multicast_address_v6); sock_v6.set_option(join_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); - } + BOOST_ASIO_CHECK_MESSAGE(!ec || ec == error::no_such_device, + ec.value() << ", " << ec.message()); - // leave_group class. + if (!ec) + { + // leave_group class. - if (have_v4) - { - ip::multicast::leave_group leave_group(multicast_address_v4); - sock_v4.set_option(leave_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); - } - - if (have_v6) - { - ip::multicast::leave_group leave_group(multicast_address_v6); - sock_v6.set_option(leave_group, ec); - BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + ip::multicast::leave_group leave_group(multicast_address_v6); + sock_v6.set_option(leave_group, ec); + BOOST_ASIO_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message()); + } } // outbound_interface class. diff --git a/libs/asio/test/ip/resolver_query_base.cpp b/libs/asio/test/ip/resolver_query_base.cpp index c69942c23..37ae816a4 100644 --- a/libs/asio/test/ip/resolver_query_base.cpp +++ b/libs/asio/test/ip/resolver_query_base.cpp @@ -2,7 +2,7 @@ // resolver_query_base.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/resolver_service.cpp b/libs/asio/test/ip/resolver_service.cpp index aa1d0435d..ab46a4113 100644 --- a/libs/asio/test/ip/resolver_service.cpp +++ b/libs/asio/test/ip/resolver_service.cpp @@ -2,7 +2,7 @@ // resolver_service.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/tcp.cpp b/libs/asio/test/ip/tcp.cpp index e8e13e5c6..dd5e033a9 100644 --- a/libs/asio/test/ip/tcp.cpp +++ b/libs/asio/test/ip/tcp.cpp @@ -2,7 +2,7 @@ // tcp.cpp // ~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -198,7 +198,8 @@ void test() ip::tcp::socket socket4(ios, ip::tcp::endpoint(ip::tcp::v4(), 0)); ip::tcp::socket socket5(ios, ip::tcp::endpoint(ip::tcp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::socket::native_handle_type native_socket1 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ip::tcp::socket socket6(ios, ip::tcp::v4(), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -234,9 +235,11 @@ void test() socket1.open(ip::tcp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::socket::native_handle_type native_socket2 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); socket1.assign(ip::tcp::v4(), native_socket2); - int native_socket3 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::socket::native_handle_type native_socket3 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); socket1.assign(ip::tcp::v4(), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -657,7 +660,8 @@ void test() ip::tcp::acceptor acceptor4(ios, ip::tcp::endpoint(ip::tcp::v4(), 0)); ip::tcp::acceptor acceptor5(ios, ip::tcp::endpoint(ip::tcp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_acceptor1 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::acceptor::native_handle_type native_acceptor1 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); ip::tcp::acceptor acceptor6(ios, ip::tcp::v4(), native_acceptor1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -685,9 +689,11 @@ void test() acceptor1.open(ip::tcp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_acceptor2 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::acceptor::native_handle_type native_acceptor2 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); acceptor1.assign(ip::tcp::v4(), native_acceptor2); - int native_acceptor3 = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + ip::tcp::acceptor::native_handle_type native_acceptor3 + = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); acceptor1.assign(ip::tcp::v4(), native_acceptor3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/ip/udp.cpp b/libs/asio/test/ip/udp.cpp index 428ed0ee0..445ef87a6 100644 --- a/libs/asio/test/ip/udp.cpp +++ b/libs/asio/test/ip/udp.cpp @@ -2,7 +2,7 @@ // udp.cpp // ~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -80,7 +80,8 @@ void test() ip::udp::socket socket4(ios, ip::udp::endpoint(ip::udp::v4(), 0)); ip::udp::socket socket5(ios, ip::udp::endpoint(ip::udp::v6(), 0)); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket1 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::udp::socket::native_handle_type native_socket1 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); ip::udp::socket socket6(ios, ip::udp::v4(), native_socket1); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) @@ -116,9 +117,11 @@ void test() socket1.open(ip::udp::v6(), ec); #if !defined(BOOST_ASIO_WINDOWS_RUNTIME) - int native_socket2 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::udp::socket::native_handle_type native_socket2 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::udp::v4(), native_socket2); - int native_socket3 = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + ip::udp::socket::native_handle_type native_socket3 + = ::socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); socket1.assign(ip::udp::v4(), native_socket3, ec); #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) diff --git a/libs/asio/test/ip/unicast.cpp b/libs/asio/test/ip/unicast.cpp index 4f342c03d..ada33d541 100644 --- a/libs/asio/test/ip/unicast.cpp +++ b/libs/asio/test/ip/unicast.cpp @@ -2,7 +2,7 @@ // unicast.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ip/v6_only.cpp b/libs/asio/test/ip/v6_only.cpp index 3b9487394..f5045da45 100644 --- a/libs/asio/test/ip/v6_only.cpp +++ b/libs/asio/test/ip/v6_only.cpp @@ -2,7 +2,7 @@ // v6_only.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/is_read_buffered.cpp b/libs/asio/test/is_read_buffered.cpp index 9cc2316d7..3b69664e0 100644 --- a/libs/asio/test/is_read_buffered.cpp +++ b/libs/asio/test/is_read_buffered.cpp @@ -2,7 +2,7 @@ // is_read_buffered.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/is_write_buffered.cpp b/libs/asio/test/is_write_buffered.cpp index c5b6dfdc4..ca8ad80a5 100644 --- a/libs/asio/test/is_write_buffered.cpp +++ b/libs/asio/test/is_write_buffered.cpp @@ -2,7 +2,7 @@ // is_write_buffered.cpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/Jamfile.v2 b/libs/asio/test/latency/Jamfile.v2 index fdab471a6..a25cef120 100644 --- a/libs/asio/test/latency/Jamfile.v2 +++ b/libs/asio/test/latency/Jamfile.v2 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +# Copyright (c) 2003-2015 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/libs/asio/test/latency/allocator.hpp b/libs/asio/test/latency/allocator.hpp index 80d8fe882..6cbfa1dca 100644 --- a/libs/asio/test/latency/allocator.hpp +++ b/libs/asio/test/latency/allocator.hpp @@ -2,7 +2,7 @@ // allocator.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/coroutine.hpp b/libs/asio/test/latency/coroutine.hpp index 193e22e30..afec509ea 100644 --- a/libs/asio/test/latency/coroutine.hpp +++ b/libs/asio/test/latency/coroutine.hpp @@ -2,7 +2,7 @@ // coroutine.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/high_res_clock.hpp b/libs/asio/test/latency/high_res_clock.hpp index e0bc59ae9..76e1fde8e 100644 --- a/libs/asio/test/latency/high_res_clock.hpp +++ b/libs/asio/test/latency/high_res_clock.hpp @@ -2,7 +2,7 @@ // high_res_clock.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/tcp_client.cpp b/libs/asio/test/latency/tcp_client.cpp index ac03d3f87..3f33d8922 100644 --- a/libs/asio/test/latency/tcp_client.cpp +++ b/libs/asio/test/latency/tcp_client.cpp @@ -2,7 +2,7 @@ // tcp_client.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/tcp_server.cpp b/libs/asio/test/latency/tcp_server.cpp index 0313e129e..a83839320 100644 --- a/libs/asio/test/latency/tcp_server.cpp +++ b/libs/asio/test/latency/tcp_server.cpp @@ -2,7 +2,7 @@ // tcp_server.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/udp_client.cpp b/libs/asio/test/latency/udp_client.cpp index e64467703..ee4a8cf42 100644 --- a/libs/asio/test/latency/udp_client.cpp +++ b/libs/asio/test/latency/udp_client.cpp @@ -2,7 +2,7 @@ // udp_client.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/udp_server.cpp b/libs/asio/test/latency/udp_server.cpp index 61af6705c..6d968cdfb 100644 --- a/libs/asio/test/latency/udp_server.cpp +++ b/libs/asio/test/latency/udp_server.cpp @@ -2,7 +2,7 @@ // udp_server.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/unyield.hpp b/libs/asio/test/latency/unyield.hpp index 0be57acc9..50ff8cf11 100644 --- a/libs/asio/test/latency/unyield.hpp +++ b/libs/asio/test/latency/unyield.hpp @@ -2,7 +2,7 @@ // unyield.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/latency/yield.hpp b/libs/asio/test/latency/yield.hpp index 71749e26c..3d3795b13 100644 --- a/libs/asio/test/latency/yield.hpp +++ b/libs/asio/test/latency/yield.hpp @@ -2,7 +2,7 @@ // yield.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/local/basic_endpoint.cpp b/libs/asio/test/local/basic_endpoint.cpp index f43d784c3..3376acae2 100644 --- a/libs/asio/test/local/basic_endpoint.cpp +++ b/libs/asio/test/local/basic_endpoint.cpp @@ -2,7 +2,7 @@ // basic_endpoint.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/local/connect_pair.cpp b/libs/asio/test/local/connect_pair.cpp index 3c4636c87..8df63b99c 100644 --- a/libs/asio/test/local/connect_pair.cpp +++ b/libs/asio/test/local/connect_pair.cpp @@ -2,7 +2,7 @@ // connect_pair.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/local/datagram_protocol.cpp b/libs/asio/test/local/datagram_protocol.cpp index 67f9ab9b1..f384585aa 100644 --- a/libs/asio/test/local/datagram_protocol.cpp +++ b/libs/asio/test/local/datagram_protocol.cpp @@ -2,7 +2,7 @@ // datagram_protocol.cpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/local/stream_protocol.cpp b/libs/asio/test/local/stream_protocol.cpp index 5b05dc532..807328c68 100644 --- a/libs/asio/test/local/stream_protocol.cpp +++ b/libs/asio/test/local/stream_protocol.cpp @@ -2,7 +2,7 @@ // stream_protocol.cpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/placeholders.cpp b/libs/asio/test/placeholders.cpp index cb1c45319..ae7c88134 100644 --- a/libs/asio/test/placeholders.cpp +++ b/libs/asio/test/placeholders.cpp @@ -2,7 +2,7 @@ // placeholders.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/posix/basic_descriptor.cpp b/libs/asio/test/posix/basic_descriptor.cpp index 2ebaba4be..be82f5614 100644 --- a/libs/asio/test/posix/basic_descriptor.cpp +++ b/libs/asio/test/posix/basic_descriptor.cpp @@ -2,7 +2,7 @@ // basic_descriptor.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/posix/basic_stream_descriptor.cpp b/libs/asio/test/posix/basic_stream_descriptor.cpp index 081b83572..608a43e76 100644 --- a/libs/asio/test/posix/basic_stream_descriptor.cpp +++ b/libs/asio/test/posix/basic_stream_descriptor.cpp @@ -2,7 +2,7 @@ // basic_stream_descriptor.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/posix/descriptor_base.cpp b/libs/asio/test/posix/descriptor_base.cpp index 5b493b541..704c787c1 100644 --- a/libs/asio/test/posix/descriptor_base.cpp +++ b/libs/asio/test/posix/descriptor_base.cpp @@ -2,7 +2,7 @@ // descriptor_base.cpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/posix/stream_descriptor.cpp b/libs/asio/test/posix/stream_descriptor.cpp index 0dec98ac3..301b29ec1 100644 --- a/libs/asio/test/posix/stream_descriptor.cpp +++ b/libs/asio/test/posix/stream_descriptor.cpp @@ -2,7 +2,7 @@ // stream_descriptor.cpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/posix/stream_descriptor_service.cpp b/libs/asio/test/posix/stream_descriptor_service.cpp index e325e1ddd..58ca15ed5 100644 --- a/libs/asio/test/posix/stream_descriptor_service.cpp +++ b/libs/asio/test/posix/stream_descriptor_service.cpp @@ -2,7 +2,7 @@ // stream_descriptor_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/raw_socket_service.cpp b/libs/asio/test/raw_socket_service.cpp index 53b06e35b..6beda6980 100644 --- a/libs/asio/test/raw_socket_service.cpp +++ b/libs/asio/test/raw_socket_service.cpp @@ -2,7 +2,7 @@ // raw_socket_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/read.cpp b/libs/asio/test/read.cpp index 248e4f6f4..ce53d4db4 100644 --- a/libs/asio/test/read.cpp +++ b/libs/asio/test/read.cpp @@ -2,7 +2,7 @@ // read.cpp // ~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/read_at.cpp b/libs/asio/test/read_at.cpp index f41acc820..d9cd88cfe 100644 --- a/libs/asio/test/read_at.cpp +++ b/libs/asio/test/read_at.cpp @@ -2,7 +2,7 @@ // read_at.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/read_until.cpp b/libs/asio/test/read_until.cpp index 207a7d129..8b6bd4978 100644 --- a/libs/asio/test/read_until.cpp +++ b/libs/asio/test/read_until.cpp @@ -2,7 +2,7 @@ // read_until.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/seq_packet_socket_service.cpp b/libs/asio/test/seq_packet_socket_service.cpp index fe6d9a7f9..242550ad0 100644 --- a/libs/asio/test/seq_packet_socket_service.cpp +++ b/libs/asio/test/seq_packet_socket_service.cpp @@ -2,7 +2,7 @@ // seq_packet_socket_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/serial_port.cpp b/libs/asio/test/serial_port.cpp index e34014cde..dfe202811 100644 --- a/libs/asio/test/serial_port.cpp +++ b/libs/asio/test/serial_port.cpp @@ -2,7 +2,7 @@ // serial_port.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/libs/asio/test/serial_port_base.cpp b/libs/asio/test/serial_port_base.cpp index c06a4f885..e51bed886 100644 --- a/libs/asio/test/serial_port_base.cpp +++ b/libs/asio/test/serial_port_base.cpp @@ -2,7 +2,7 @@ // serial_port_base.cpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/libs/asio/test/serial_port_service.cpp b/libs/asio/test/serial_port_service.cpp index 68d02243d..a4b6471a5 100644 --- a/libs/asio/test/serial_port_service.cpp +++ b/libs/asio/test/serial_port_service.cpp @@ -2,7 +2,7 @@ // serial_port_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/libs/asio/test/signal_set.cpp b/libs/asio/test/signal_set.cpp index a4e497b0d..ab2e06e12 100644 --- a/libs/asio/test/signal_set.cpp +++ b/libs/asio/test/signal_set.cpp @@ -2,7 +2,7 @@ // signal_set.cpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/signal_set_service.cpp b/libs/asio/test/signal_set_service.cpp index 52cfc40a0..be0881801 100644 --- a/libs/asio/test/signal_set_service.cpp +++ b/libs/asio/test/signal_set_service.cpp @@ -2,7 +2,7 @@ // signal_set_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/socket_acceptor_service.cpp b/libs/asio/test/socket_acceptor_service.cpp index ed422fc94..3c260b7bb 100644 --- a/libs/asio/test/socket_acceptor_service.cpp +++ b/libs/asio/test/socket_acceptor_service.cpp @@ -2,7 +2,7 @@ // socket_acceptor_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/socket_base.cpp b/libs/asio/test/socket_base.cpp index 3e1ce7e68..fbfbf2263 100644 --- a/libs/asio/test/socket_base.cpp +++ b/libs/asio/test/socket_base.cpp @@ -2,7 +2,7 @@ // socket_base.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/Jamfile b/libs/asio/test/ssl/Jamfile index 4c663dd2c..d22cc54ad 100644 --- a/libs/asio/test/ssl/Jamfile +++ b/libs/asio/test/ssl/Jamfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +# Copyright (c) 2003-2015 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) @@ -25,7 +25,6 @@ if $(UNIX) template unit_test : <lib>@boost/libs/system/build/boost_system - : <lib>@boost/libs/test/build/boost_test_exec_monitor : <include>../../../.. <define>BOOST_ALL_NO_LIB=1 <threading>multi diff --git a/libs/asio/test/ssl/Jamfile.v2 b/libs/asio/test/ssl/Jamfile.v2 index f16082a03..13b16fed6 100644 --- a/libs/asio/test/ssl/Jamfile.v2 +++ b/libs/asio/test/ssl/Jamfile.v2 @@ -1,5 +1,5 @@ # -# Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +# Copyright (c) 2003-2015 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) @@ -35,7 +35,7 @@ local USE_SELECT = project : requirements <library>/boost/date_time//boost_date_time - <library>/boost/test//boost_test_exec_monitor + <library>/boost/system//boost_system <define>BOOST_ALL_NO_LIB=1 <threading>multi <os>SOLARIS:<library>socket diff --git a/libs/asio/test/ssl/basic_context.cpp b/libs/asio/test/ssl/basic_context.cpp index 1c9d4bdf8..030d01ca1 100644 --- a/libs/asio/test/ssl/basic_context.cpp +++ b/libs/asio/test/ssl/basic_context.cpp @@ -2,7 +2,7 @@ // basic_context.cpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/context.cpp b/libs/asio/test/ssl/context.cpp index 2aafb0168..ffc541b57 100644 --- a/libs/asio/test/ssl/context.cpp +++ b/libs/asio/test/ssl/context.cpp @@ -2,7 +2,7 @@ // context.cpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/context_base.cpp b/libs/asio/test/ssl/context_base.cpp index 6fb133a43..2a6cd585b 100644 --- a/libs/asio/test/ssl/context_base.cpp +++ b/libs/asio/test/ssl/context_base.cpp @@ -2,7 +2,7 @@ // context_base.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/context_service.cpp b/libs/asio/test/ssl/context_service.cpp index 20ca18679..1dc0bc319 100644 --- a/libs/asio/test/ssl/context_service.cpp +++ b/libs/asio/test/ssl/context_service.cpp @@ -2,7 +2,7 @@ // context_service.cpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/rfc2818_verification.cpp b/libs/asio/test/ssl/rfc2818_verification.cpp index 1f0a05310..a48c65d49 100644 --- a/libs/asio/test/ssl/rfc2818_verification.cpp +++ b/libs/asio/test/ssl/rfc2818_verification.cpp @@ -2,7 +2,7 @@ // rfc2818_verification.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/stream.cpp b/libs/asio/test/ssl/stream.cpp index 330260347..a3d89ca6d 100644 --- a/libs/asio/test/ssl/stream.cpp +++ b/libs/asio/test/ssl/stream.cpp @@ -2,7 +2,7 @@ // stream.cpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/stream_base.cpp b/libs/asio/test/ssl/stream_base.cpp index 06a86dffd..69115be33 100644 --- a/libs/asio/test/ssl/stream_base.cpp +++ b/libs/asio/test/ssl/stream_base.cpp @@ -2,7 +2,7 @@ // stream_base.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/ssl/stream_service.cpp b/libs/asio/test/ssl/stream_service.cpp index b24aea910..cd919b13b 100644 --- a/libs/asio/test/ssl/stream_service.cpp +++ b/libs/asio/test/ssl/stream_service.cpp @@ -2,7 +2,7 @@ // stream_service.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/steady_timer.cpp b/libs/asio/test/steady_timer.cpp index 8f914da77..07a99f3f0 100644 --- a/libs/asio/test/steady_timer.cpp +++ b/libs/asio/test/steady_timer.cpp @@ -2,7 +2,7 @@ // steady_timer.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/strand.cpp b/libs/asio/test/strand.cpp index be0cb8f44..d03845b61 100644 --- a/libs/asio/test/strand.cpp +++ b/libs/asio/test/strand.cpp @@ -2,7 +2,7 @@ // strand.cpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -34,7 +34,6 @@ #endif // defined(BOOST_ASIO_HAS_BOOST_BIND) using namespace boost::asio; -typedef io_service::strand strand; #if defined(BOOST_ASIO_HAS_BOOST_BIND) namespace bindns = boost; @@ -58,7 +57,7 @@ void increment(int* count) ++(*count); } -void increment_without_lock(strand* s, int* count) +void increment_without_lock(io_service::strand* s, int* count) { BOOST_ASIO_CHECK(!s->running_in_this_thread()); @@ -71,7 +70,7 @@ void increment_without_lock(strand* s, int* count) BOOST_ASIO_CHECK(*count == original_count + 1); } -void increment_with_lock(strand* s, int* count) +void increment_with_lock(io_service::strand* s, int* count) { BOOST_ASIO_CHECK(s->running_in_this_thread()); @@ -92,7 +91,7 @@ void sleep_increment(io_service* ios, int* count) ++(*count); } -void start_sleep_increments(io_service* ios, strand* s, int* count) +void start_sleep_increments(io_service* ios, io_service::strand* s, int* count) { // Give all threads a chance to start. timer t(*ios, chronons::seconds(2)); @@ -117,7 +116,7 @@ void io_service_run(io_service* ios) void strand_test() { io_service ios; - strand s(ios); + io_service::strand s(ios); int count = 0; ios.post(bindns::bind(increment_without_lock, &s, &count)); diff --git a/libs/asio/test/stream_socket_service.cpp b/libs/asio/test/stream_socket_service.cpp index 4faa1a6bc..8eae691f8 100644 --- a/libs/asio/test/stream_socket_service.cpp +++ b/libs/asio/test/stream_socket_service.cpp @@ -2,7 +2,7 @@ // stream_socket_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/streambuf.cpp b/libs/asio/test/streambuf.cpp index b165ee937..d4641d40e 100644 --- a/libs/asio/test/streambuf.cpp +++ b/libs/asio/test/streambuf.cpp @@ -2,7 +2,7 @@ // streambuf.cpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/system_timer.cpp b/libs/asio/test/system_timer.cpp index de25a4694..80e68d6ff 100644 --- a/libs/asio/test/system_timer.cpp +++ b/libs/asio/test/system_timer.cpp @@ -2,7 +2,7 @@ // system_timer.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/time_traits.cpp b/libs/asio/test/time_traits.cpp index f764dc379..9ae83f519 100644 --- a/libs/asio/test/time_traits.cpp +++ b/libs/asio/test/time_traits.cpp @@ -2,7 +2,7 @@ // time_traits.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/unit_test.hpp b/libs/asio/test/unit_test.hpp index 8f780b17b..849b4db77 100644 --- a/libs/asio/test/unit_test.hpp +++ b/libs/asio/test/unit_test.hpp @@ -2,7 +2,7 @@ // unit_test.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) @@ -12,6 +12,8 @@ #define UNIT_TEST_HPP #include <boost/asio/detail/config.hpp> +#include <iostream> +#include <boost/asio/detail/atomic_count.hpp> #if defined(__sun) # include <stdlib.h> // Needed for lrand48. @@ -29,89 +31,136 @@ #endif // defined(__BORLANDC__) #if defined(BOOST_ASIO_MSVC) +# pragma warning (disable:4127) # pragma warning (push) # pragma warning (disable:4244) # pragma warning (disable:4702) #endif // defined(BOOST_ASIO_MSVC) -#if defined(BOOST_ASIO_STANDALONE) - -#include <cassert> -#include <iostream> +#if !defined(BOOST_ASIO_TEST_IOSTREAM) +# define BOOST_ASIO_TEST_IOSTREAM std::cerr +#endif // !defined(BOOST_ASIO_TEST_IOSTREAM) -#if defined(NDEBUG) -# error NDEBUG must not be defined when building these unit tests -#endif // defined(NDEBUG) +namespace boost { +namespace asio { +namespace detail { -#define BOOST_ASIO_CHECK(expr) assert(expr) +inline const char*& test_name() +{ + static const char* name = 0; + return name; +} -#define BOOST_ASIO_CHECK_MESSAGE(expr, msg) \ - do { if (!(expr)) { std::cout << msg << std::endl; assert(expr); } } while (0) +inline atomic_count& test_errors() +{ + static atomic_count errors(0); + return errors; +} -#define BOOST_ASIO_WARN_MESSAGE(expr, msg) \ - do { if (!(expr)) { std::cout << msg << std::endl; } } while (0) +inline void begin_test_suite(const char* name) +{ + boost::asio::detail::test_name(); + boost::asio::detail::test_errors(); + BOOST_ASIO_TEST_IOSTREAM << name << " test suite begins" << std::endl; +} -#define BOOST_ASIO_ERROR(msg) assert(0 && msg) +inline int end_test_suite(const char* name) +{ + BOOST_ASIO_TEST_IOSTREAM << name << " test suite ends" << std::endl; + BOOST_ASIO_TEST_IOSTREAM << "\n*** "; + long errors = boost::asio::detail::test_errors(); + if (errors == 0) + BOOST_ASIO_TEST_IOSTREAM << "No errors detected."; + else if (errors == 1) + BOOST_ASIO_TEST_IOSTREAM << "1 error detected."; + else + BOOST_ASIO_TEST_IOSTREAM << errors << " errors detected." << std::endl; + BOOST_ASIO_TEST_IOSTREAM << std::endl; + return errors == 0 ? 0 : 1; +} -#define BOOST_ASIO_TEST_SUITE(name, tests) \ - int main() \ - { \ - std::cout << name << " test suite begins" << std::endl; \ - tests \ - std::cout << name << " test suite ends" << std::endl; \ - return 0; \ - } +template <void (*Test)()> +inline void run_test(const char* name) +{ + test_name() = name; + long errors_before = boost::asio::detail::test_errors(); + Test(); + if (test_errors() == errors_before) + BOOST_ASIO_TEST_IOSTREAM << name << " passed" << std::endl; + else + BOOST_ASIO_TEST_IOSTREAM << name << " failed" << std::endl; +} -#define BOOST_ASIO_TEST_CASE(test) \ - test(); \ - std::cout << #test << " passed" << std::endl; +template <void (*)()> +inline void compile_test(const char* name) +{ + BOOST_ASIO_TEST_IOSTREAM << name << " passed" << std::endl; +} -#define BOOST_ASIO_COMPILE_TEST_CASE(test) \ - compile_test<&test>(); \ - std::cout << #test << " passed" << std::endl; +#if defined(BOOST_ASIO_NO_EXCEPTIONS) -#else // defined(BOOST_ASIO_STANDALONE) +template <typename T> +void throw_exception(const T& t) +{ + BOOST_ASIO_TEST_IOSTREAM << "Exception: " << t.what() << std::endl; + std::abort(); +} -#include <boost/test/unit_test.hpp> -using boost::unit_test::test_suite; +#endif // defined(BOOST_ASIO_NO_EXCEPTIONS) -#define BOOST_ASIO_CHECK(expr) BOOST_CHECK(expr) +} // namespace detail +} // namespace asio +} // namespace boost -#define BOOST_ASIO_CHECK_MESSAGE(expr, msg) BOOST_CHECK_MESSAGE(expr, msg) +#define BOOST_ASIO_CHECK(expr) \ + do { if (!(expr)) { \ + BOOST_ASIO_TEST_IOSTREAM << __FILE__ << "(" << __LINE__ << "): " \ + << boost::asio::detail::test_name() << ": " \ + << "check '" << #expr << "' failed" << std::endl; \ + ++boost::asio::detail::test_errors(); \ + } } while (0) -#define BOOST_ASIO_WARN_MESSAGE(expr, msg) BOOST_WARN_MESSAGE(expr, msg) +#define BOOST_ASIO_CHECK_MESSAGE(expr, msg) \ + do { if (!(expr)) { \ + BOOST_ASIO_TEST_IOSTREAM << __FILE__ << "(" << __LINE__ << "): " \ + << boost::asio::detail::test_name() << ": " \ + << msg << std::endl; \ + ++boost::asio::detail::test_errors(); \ + } } while (0) -#define BOOST_ASIO_ERROR(expr) BOOST_ERROR(expr) +#define BOOST_ASIO_WARN_MESSAGE(expr, msg) \ + do { if (!(expr)) { \ + BOOST_ASIO_TEST_IOSTREAM << __FILE__ << "(" << __LINE__ << "): " \ + << boost::asio::detail::test_name() << ": " \ + << msg << std::endl; \ + } } while (0) + +#define BOOST_ASIO_ERROR(msg) \ + do { \ + BOOST_ASIO_TEST_IOSTREAM << __FILE__ << "(" << __LINE__ << "): " \ + << boost::asio::detail::test_name() << ": " \ + << msg << std::endl; \ + ++boost::asio::detail::test_errors(); \ + } while (0) #define BOOST_ASIO_TEST_SUITE(name, tests) \ - test_suite* init_unit_test_suite(int, char*[]) \ + int main() \ { \ - test_suite* t = BOOST_TEST_SUITE(name); \ + boost::asio::detail::begin_test_suite(name); \ tests \ - return t; \ + return boost::asio::detail::end_test_suite(name); \ } #define BOOST_ASIO_TEST_CASE(test) \ - t->add(BOOST_TEST_CASE(&test)); + boost::asio::detail::run_test<&test>(#test); #define BOOST_ASIO_COMPILE_TEST_CASE(test) \ - t->add(BOOST_TEST_CASE(&compile_test<&test>)); - -#endif // defined(BOOST_ASIO_STANDALONE) - -#if defined(BOOST_ASIO_MSVC) -# pragma warning (pop) -#endif // defined(BOOST_ASIO_MSVC) + boost::asio::detail::compile_test<&test>(#test); inline void null_test() { } -template <void (*)()> -inline void compile_test() -{ -} - #if defined(__GNUC__) && defined(_AIX) // AIX needs this symbol defined in asio, even if it doesn't do anything. @@ -121,4 +170,8 @@ int test_main(int, char**) #endif // defined(__GNUC__) && defined(_AIX) +#if defined(BOOST_ASIO_MSVC) +# pragma warning (pop) +#endif // defined(BOOST_ASIO_MSVC) + #endif // UNIT_TEST_HPP diff --git a/libs/asio/test/wait_traits.cpp b/libs/asio/test/wait_traits.cpp index bbf46cb2f..5412c9103 100644 --- a/libs/asio/test/wait_traits.cpp +++ b/libs/asio/test/wait_traits.cpp @@ -2,7 +2,7 @@ // wait_traits.cpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/waitable_timer_service.cpp b/libs/asio/test/waitable_timer_service.cpp index 4b73307be..d01d0130a 100644 --- a/libs/asio/test/waitable_timer_service.cpp +++ b/libs/asio/test/waitable_timer_service.cpp @@ -2,7 +2,7 @@ // waitable_timer_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/basic_handle.cpp b/libs/asio/test/windows/basic_handle.cpp index 803ecd015..e70b5efd6 100644 --- a/libs/asio/test/windows/basic_handle.cpp +++ b/libs/asio/test/windows/basic_handle.cpp @@ -2,7 +2,7 @@ // basic_handle.cpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/basic_object_handle.cpp b/libs/asio/test/windows/basic_object_handle.cpp index d67a0f025..3f96ea832 100644 --- a/libs/asio/test/windows/basic_object_handle.cpp +++ b/libs/asio/test/windows/basic_object_handle.cpp @@ -2,7 +2,7 @@ // basic_object_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/basic_random_access_handle.cpp b/libs/asio/test/windows/basic_random_access_handle.cpp index d6e9a601b..ec3a9f2fe 100644 --- a/libs/asio/test/windows/basic_random_access_handle.cpp +++ b/libs/asio/test/windows/basic_random_access_handle.cpp @@ -2,7 +2,7 @@ // basic_random_access_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/basic_stream_handle.cpp b/libs/asio/test/windows/basic_stream_handle.cpp index 8ccc828b9..71a3cc212 100644 --- a/libs/asio/test/windows/basic_stream_handle.cpp +++ b/libs/asio/test/windows/basic_stream_handle.cpp @@ -2,7 +2,7 @@ // basic_stream_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/object_handle.cpp b/libs/asio/test/windows/object_handle.cpp index 6bb797140..13efdc85a 100644 --- a/libs/asio/test/windows/object_handle.cpp +++ b/libs/asio/test/windows/object_handle.cpp @@ -2,7 +2,7 @@ // object_handle.cpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/object_handle_service.cpp b/libs/asio/test/windows/object_handle_service.cpp index c16b6c556..cdc92ed0d 100644 --- a/libs/asio/test/windows/object_handle_service.cpp +++ b/libs/asio/test/windows/object_handle_service.cpp @@ -2,7 +2,7 @@ // object_handle_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/overlapped_ptr.cpp b/libs/asio/test/windows/overlapped_ptr.cpp index c6d2dd08f..d5c7ceddd 100644 --- a/libs/asio/test/windows/overlapped_ptr.cpp +++ b/libs/asio/test/windows/overlapped_ptr.cpp @@ -2,7 +2,7 @@ // overlapped_ptr.cpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/random_access_handle.cpp b/libs/asio/test/windows/random_access_handle.cpp index 34974e537..f50c98b48 100644 --- a/libs/asio/test/windows/random_access_handle.cpp +++ b/libs/asio/test/windows/random_access_handle.cpp @@ -2,7 +2,7 @@ // random_access_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/random_access_handle_service.cpp b/libs/asio/test/windows/random_access_handle_service.cpp index 5ef6e2d1d..583ee1d1a 100644 --- a/libs/asio/test/windows/random_access_handle_service.cpp +++ b/libs/asio/test/windows/random_access_handle_service.cpp @@ -2,7 +2,7 @@ // random_access_handle_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/stream_handle.cpp b/libs/asio/test/windows/stream_handle.cpp index 0bf18a9a8..e5786a308 100644 --- a/libs/asio/test/windows/stream_handle.cpp +++ b/libs/asio/test/windows/stream_handle.cpp @@ -2,7 +2,7 @@ // stream_handle.cpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/windows/stream_handle_service.cpp b/libs/asio/test/windows/stream_handle_service.cpp index a7184c71f..8f7febd00 100644 --- a/libs/asio/test/windows/stream_handle_service.cpp +++ b/libs/asio/test/windows/stream_handle_service.cpp @@ -2,7 +2,7 @@ // stream_handle_service.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/write.cpp b/libs/asio/test/write.cpp index 6063b74d8..ab0cc50f2 100644 --- a/libs/asio/test/write.cpp +++ b/libs/asio/test/write.cpp @@ -2,7 +2,7 @@ // write.cpp // ~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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/libs/asio/test/write_at.cpp b/libs/asio/test/write_at.cpp index 91136b25a..38754f5c0 100644 --- a/libs/asio/test/write_at.cpp +++ b/libs/asio/test/write_at.cpp @@ -2,7 +2,7 @@ // write_at.cpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2015 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) |