Ensure new headers are self-contained.

This commit is contained in:
Christopher Kohlhoff 2016-08-27 17:03:17 +10:00
parent a00d184641
commit d636aafe8a
15 changed files with 350 additions and 0 deletions

View File

@ -18,8 +18,10 @@
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/variadic_templates.hpp"
#include "asio/associated_executor.hpp"
#include "asio/associated_allocator.hpp"
#include "asio/async_result.hpp"
#include "asio/execution_context.hpp"
#include "asio/is_executor.hpp"
#include "asio/uses_executor.hpp"

View File

@ -10,6 +10,9 @@ LDADD = libasio.a
endif
check_PROGRAMS = \
unit/associated_allocator \
unit/associated_executor \
unit/async_result \
unit/basic_datagram_socket \
unit/basic_deadline_timer \
unit/basic_raw_socket \
@ -20,6 +23,7 @@ check_PROGRAMS = \
unit/basic_stream_socket \
unit/basic_streambuf \
unit/basic_waitable_timer \
unit/bind_executor \
unit/buffered_read_stream \
unit/buffered_stream \
unit/buffered_write_stream \
@ -31,7 +35,12 @@ check_PROGRAMS = \
unit/datagram_socket_service \
unit/deadline_timer_service \
unit/deadline_timer \
unit/defer \
unit/dispatch \
unit/error \
unit/execution_context \
unit/executor \
unit/executor_work_guard \
unit/generic/basic_endpoint \
unit/generic/datagram_protocol \
unit/generic/raw_protocol \
@ -68,6 +77,7 @@ check_PROGRAMS = \
unit/local/connect_pair \
unit/local/datagram_protocol \
unit/local/stream_protocol \
unit/packaged_task \
unit/placeholders \
unit/posix/basic_descriptor \
unit/posix/basic_stream_descriptor \
@ -75,6 +85,7 @@ check_PROGRAMS = \
unit/posix/descriptor_base \
unit/posix/stream_descriptor \
unit/posix/stream_descriptor_service \
unit/post \
unit/raw_socket_service \
unit/read \
unit/read_at \
@ -95,6 +106,7 @@ check_PROGRAMS = \
unit/thread \
unit/time_traits \
unit/use_future \
unit/uses_executor \
unit/wait_traits \
unit/waitable_timer_service \
unit/windows/basic_handle \
@ -132,6 +144,9 @@ check_PROGRAMS += \
endif
TESTS = \
unit/associated_allocator \
unit/associated_executor \
unit/async_result \
unit/basic_datagram_socket \
unit/basic_deadline_timer \
unit/basic_raw_socket \
@ -142,6 +157,7 @@ TESTS = \
unit/basic_stream_socket \
unit/basic_streambuf \
unit/basic_waitable_timer \
unit/bind_executor \
unit/buffered_read_stream \
unit/buffered_stream \
unit/buffered_write_stream \
@ -152,7 +168,12 @@ TESTS = \
unit/datagram_socket_service \
unit/deadline_timer_service \
unit/deadline_timer \
unit/defer \
unit/dispatch \
unit/error \
unit/execution_context \
unit/executor \
unit/executor_work_guard \
unit/high_resolution_timer \
unit/io_context \
unit/ip/address \
@ -184,6 +205,7 @@ TESTS = \
unit/local/connect_pair \
unit/local/datagram_protocol \
unit/local/stream_protocol \
unit/packaged_task \
unit/placeholders \
unit/posix/basic_descriptor \
unit/posix/basic_stream_descriptor \
@ -191,6 +213,7 @@ TESTS = \
unit/posix/descriptor_base \
unit/posix/stream_descriptor \
unit/posix/stream_descriptor_service \
unit/post \
unit/raw_socket_service \
unit/read \
unit/read_at \
@ -211,6 +234,7 @@ TESTS = \
unit/thread \
unit/time_traits \
unit/use_future \
unit/uses_executor \
unit/wait_traits \
unit/waitable_timer_service \
unit/windows/basic_handle \
@ -255,6 +279,9 @@ performance_client_SOURCES = performance/client.cpp
performance_server_SOURCES = performance/server.cpp
endif
unit_associated_allocator_SOURCES = unit/associated_allocator.cpp
unit_associated_executor_SOURCES = unit/associated_executor.cpp
unit_async_result_SOURCES = unit/async_result.cpp
unit_basic_datagram_socket_SOURCES = unit/basic_datagram_socket.cpp
unit_basic_deadline_timer_SOURCES = unit/basic_deadline_timer.cpp
unit_basic_raw_socket_SOURCES = unit/basic_raw_socket.cpp
@ -265,6 +292,7 @@ unit_basic_socket_acceptor_SOURCES = unit/basic_socket_acceptor.cpp
unit_basic_stream_socket_SOURCES = unit/basic_stream_socket.cpp
unit_basic_streambuf_SOURCES = unit/basic_streambuf.cpp
unit_basic_waitable_timer_SOURCES = unit/basic_waitable_timer.cpp
unit_bind_executor_SOURCES = unit/bind_executor.cpp
unit_buffer_SOURCES = unit/buffer.cpp
unit_buffers_iterator_SOURCES = unit/buffers_iterator.cpp
unit_buffered_read_stream_SOURCES = unit/buffered_read_stream.cpp
@ -276,7 +304,12 @@ unit_coroutine_SOURCES = unit/coroutine.cpp
unit_datagram_socket_service_SOURCES = unit/datagram_socket_service.cpp
unit_deadline_timer_service_SOURCES = unit/deadline_timer_service.cpp
unit_deadline_timer_SOURCES = unit/deadline_timer.cpp
unit_defer_SOURCES = unit/defer.cpp
unit_dispatch_SOURCES = unit/dispatch.cpp
unit_error_SOURCES = unit/error.cpp
unit_execution_context_SOURCES = unit/execution_context.cpp
unit_executor_SOURCES = unit/executor.cpp
unit_executor_work_guard_SOURCES = unit/executor_work_guard.cpp
unit_generic_basic_endpoint_SOURCES = unit/generic/basic_endpoint.cpp
unit_generic_datagram_protocol_SOURCES = unit/generic/datagram_protocol.cpp
unit_generic_raw_protocol_SOURCES = unit/generic/raw_protocol.cpp
@ -313,6 +346,7 @@ unit_local_basic_endpoint_SOURCES = unit/local/basic_endpoint.cpp
unit_local_connect_pair_SOURCES = unit/local/connect_pair.cpp
unit_local_datagram_protocol_SOURCES = unit/local/datagram_protocol.cpp
unit_local_stream_protocol_SOURCES = unit/local/stream_protocol.cpp
unit_packaged_task_SOURCES = unit/packaged_task.cpp
unit_placeholders_SOURCES = unit/placeholders.cpp
unit_posix_basic_descriptor_SOURCES = unit/posix/basic_descriptor.cpp
unit_posix_basic_stream_descriptor_SOURCES = unit/posix/basic_stream_descriptor.cpp
@ -320,6 +354,7 @@ unit_posix_descriptor_SOURCES = unit/posix/descriptor.cpp
unit_posix_descriptor_base_SOURCES = unit/posix/descriptor_base.cpp
unit_posix_stream_descriptor_SOURCES = unit/posix/stream_descriptor.cpp
unit_posix_stream_descriptor_service_SOURCES = unit/posix/stream_descriptor_service.cpp
unit_post_SOURCES = unit/post.cpp
unit_raw_socket_service_SOURCES = unit/raw_socket_service.cpp
unit_read_SOURCES = unit/read.cpp
unit_read_at_SOURCES = unit/read_at.cpp
@ -340,6 +375,7 @@ unit_system_timer_SOURCES = unit/system_timer.cpp
unit_thread_SOURCES = unit/thread.cpp
unit_time_traits_SOURCES = unit/time_traits.cpp
unit_use_future_SOURCES = unit/use_future.cpp
unit_uses_executor_SOURCES = unit/uses_executor.cpp
unit_wait_traits_SOURCES = unit/wait_traits.cpp
unit_waitable_timer_service_SOURCES = unit/waitable_timer_service.cpp
unit_windows_basic_handle_SOURCES = unit/windows/basic_handle.cpp

View File

@ -7,6 +7,9 @@
*.manifest
*.pdb
*.tds
associated_allocator
associated_executor
async_result
basic_datagram_socket
basic_deadline_timer
basic_raw_socket
@ -17,6 +20,7 @@ basic_socket_acceptor
basic_stream_socket
basic_streambuf
basic_waitable_timer
bind_executor
buffer
buffered_read_stream
buffered_stream
@ -28,14 +32,21 @@ coroutine
datagram_socket_service
deadline_timer
deadline_timer_service
defer
dispatch
error
error_handler
execution_context
executor
executor_work_guard
high_resolution_timer
io_context
io_service
is_read_buffered
is_write_buffered
packaged_task
placeholders
post
raw_socket_service
read
read_at
@ -56,6 +67,7 @@ system_timer
thread
time_traits
use_future
uses_executor
wait_traits
waitable_timer_service
write

View File

@ -0,0 +1,25 @@
//
// associated_allocator.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/associated_allocator.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"associated_allocator",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// associated_executor.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/associated_executor.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"associated_executor",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// async_result.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/async_result.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"async_result",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// bind_executor.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/bind_executor.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"bind_executor",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// defer.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/defer.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"defer",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// dispatch.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/dispatch.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"dispatch",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// execution_context.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/execution_context.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"execution_context",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// executor.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/executor.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"executor",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// executor_work_guard.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/executor_work_guard.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"executor_work_guard",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// packaged_task.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/packaged_task.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"packaged_task",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// post.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/post.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"post",
ASIO_TEST_CASE(null_test)
)

View File

@ -0,0 +1,25 @@
//
// uses_executor.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/uses_executor.hpp"
#include "unit_test.hpp"
ASIO_TEST_SUITE
(
"uses_executor",
ASIO_TEST_CASE(null_test)
)