mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Tidy up core sources:
The core headers are moved to their own directory (but remain in the same namespace).
This commit is contained in:
@@ -4,34 +4,13 @@ GroupSources(extras/beast beast)
|
||||
GroupSources(include/beast beast)
|
||||
GroupSources(test "/")
|
||||
|
||||
add_executable (core-tests
|
||||
add_executable (lib-tests
|
||||
${BEAST_INCLUDES}
|
||||
../extras/beast/unit_test/main.cpp
|
||||
async_completion.cpp
|
||||
basic_streambuf.cpp
|
||||
bind_handler.cpp
|
||||
buffer_cat.cpp
|
||||
buffer_concepts.cpp
|
||||
buffers_adapter.cpp
|
||||
consuming_buffers.cpp
|
||||
error.cpp
|
||||
handler_alloc.cpp
|
||||
handler_concepts.cpp
|
||||
core.cpp
|
||||
http.cpp
|
||||
placeholders.cpp
|
||||
prepare_buffers.cpp
|
||||
static_streambuf.cpp
|
||||
static_string.cpp
|
||||
stream_concepts.cpp
|
||||
streambuf.cpp
|
||||
streambuf_readstream.cpp
|
||||
to_string.cpp
|
||||
version.cpp
|
||||
websocket.cpp
|
||||
write_streambuf.cpp
|
||||
detail/base64.cpp
|
||||
detail/empty_base_optimization.cpp
|
||||
detail/sha1.cpp
|
||||
)
|
||||
|
||||
if (NOT WIN32)
|
||||
|
||||
53
test/Jamfile
53
test/Jamfile
@@ -7,33 +7,35 @@
|
||||
|
||||
import os ;
|
||||
|
||||
compile core.cpp : : ;
|
||||
compile http.cpp : : ;
|
||||
compile version.cpp : : ;
|
||||
compile websocket.cpp : : ;
|
||||
|
||||
unit-test core-tests :
|
||||
../extras/beast/unit_test/main.cpp
|
||||
async_completion.cpp
|
||||
basic_streambuf.cpp
|
||||
bind_handler.cpp
|
||||
buffer_cat.cpp
|
||||
buffer_concepts.cpp
|
||||
buffers_adapter.cpp
|
||||
consuming_buffers.cpp
|
||||
error.cpp
|
||||
handler_alloc.cpp
|
||||
handler_concepts.cpp
|
||||
http.cpp
|
||||
placeholders.cpp
|
||||
prepare_buffers.cpp
|
||||
static_streambuf.cpp
|
||||
static_string.cpp
|
||||
stream_concepts.cpp
|
||||
streambuf.cpp
|
||||
streambuf_readstream.cpp
|
||||
to_string.cpp
|
||||
version.cpp
|
||||
websocket.cpp
|
||||
write_streambuf.cpp
|
||||
detail/base64.cpp
|
||||
detail/empty_base_optimization.cpp
|
||||
detail/sha1.cpp
|
||||
core/async_completion.cpp
|
||||
core/basic_streambuf.cpp
|
||||
core/bind_handler.cpp
|
||||
core/buffer_cat.cpp
|
||||
core/buffer_concepts.cpp
|
||||
core/buffers_adapter.cpp
|
||||
core/consuming_buffers.cpp
|
||||
core/error.cpp
|
||||
core/handler_alloc.cpp
|
||||
core/handler_concepts.cpp
|
||||
core/placeholders.cpp
|
||||
core/prepare_buffers.cpp
|
||||
core/static_streambuf.cpp
|
||||
core/static_string.cpp
|
||||
core/stream_concepts.cpp
|
||||
core/streambuf.cpp
|
||||
core/streambuf_readstream.cpp
|
||||
core/to_string.cpp
|
||||
core/write_streambuf.cpp
|
||||
core/detail/base64.cpp
|
||||
core/detail/empty_base_optimization.cpp
|
||||
core/detail/sha1.cpp
|
||||
;
|
||||
|
||||
unit-test http-tests :
|
||||
@@ -80,4 +82,3 @@ unit-test websocket-tests :
|
||||
exe websocket-echo :
|
||||
websocket/websocket_echo.cpp
|
||||
;
|
||||
|
||||
|
||||
9
test/core.cpp
Normal file
9
test/core.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
//
|
||||
// Copyright (c) 2013-2016 Vinnie Falco (vinnie dot falco at gmail 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)
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/core.hpp>
|
||||
36
test/core/CMakeLists.txt
Normal file
36
test/core/CMakeLists.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
# Part of Beast
|
||||
|
||||
GroupSources(extras/beast beast)
|
||||
GroupSources(include/beast beast)
|
||||
GroupSources(test/core "/")
|
||||
|
||||
add_executable (core-tests
|
||||
${BEAST_INCLUDES}
|
||||
../../extras/beast/unit_test/main.cpp
|
||||
async_completion.cpp
|
||||
basic_streambuf.cpp
|
||||
bind_handler.cpp
|
||||
buffer_cat.cpp
|
||||
buffer_concepts.cpp
|
||||
buffers_adapter.cpp
|
||||
consuming_buffers.cpp
|
||||
error.cpp
|
||||
handler_alloc.cpp
|
||||
handler_concepts.cpp
|
||||
placeholders.cpp
|
||||
prepare_buffers.cpp
|
||||
static_streambuf.cpp
|
||||
static_string.cpp
|
||||
stream_concepts.cpp
|
||||
streambuf.cpp
|
||||
streambuf_readstream.cpp
|
||||
to_string.cpp
|
||||
write_streambuf.cpp
|
||||
detail/base64.cpp
|
||||
detail/empty_base_optimization.cpp
|
||||
detail/sha1.cpp
|
||||
)
|
||||
|
||||
if (NOT WIN32)
|
||||
target_link_libraries(core-tests ${Boost_LIBRARIES})
|
||||
endif()
|
||||
@@ -6,4 +6,4 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/async_completion.hpp>
|
||||
#include <beast/core/async_completion.hpp>
|
||||
@@ -6,10 +6,10 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/basic_streambuf.hpp>
|
||||
#include <beast/core/basic_streambuf.hpp>
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/to_string.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/core/to_string.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <algorithm>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/bind_handler.hpp>
|
||||
#include <beast/core/bind_handler.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <functional>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/buffer_cat.hpp>
|
||||
#include <beast/core/buffer_cat.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/buffer_concepts.hpp>
|
||||
#include <beast/core/buffer_concepts.hpp>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/buffers_adapter.hpp>
|
||||
#include <beast/core/buffers_adapter.hpp>
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/consuming_buffers.hpp>
|
||||
#include <beast/core/consuming_buffers.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
@@ -5,7 +5,9 @@
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <beast/detail/base64.hpp>
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/core/detail/base64.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
|
||||
namespace beast {
|
||||
@@ -5,7 +5,9 @@
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <beast/detail/empty_base_optimization.hpp>
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/core/detail/empty_base_optimization.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
|
||||
namespace beast {
|
||||
@@ -5,7 +5,7 @@
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <beast/detail/sha1.hpp>
|
||||
#include <beast/core/detail/sha1.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <array>
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/error.hpp>
|
||||
#include <beast/core/error.hpp>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/to_string.hpp>
|
||||
#include <beast/core/to_string.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/handler_concepts.hpp>
|
||||
#include <beast/core/handler_concepts.hpp>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/placeholders.hpp>
|
||||
#include <beast/core/placeholders.hpp>
|
||||
@@ -6,9 +6,9 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/prepare_buffers.hpp>
|
||||
#include <beast/core/prepare_buffers.hpp>
|
||||
|
||||
#include <beast/consuming_buffers.hpp>
|
||||
#include <beast/core/consuming_buffers.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <string>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/static_streambuf.hpp>
|
||||
#include <beast/core/static_streambuf.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/static_string.hpp>
|
||||
#include <beast/core/static_string.hpp>
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/stream_concepts.hpp>
|
||||
#include <beast/core/stream_concepts.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
|
||||
namespace beast {
|
||||
@@ -6,4 +6,4 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
@@ -6,9 +6,9 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/streambuf_readstream.hpp>
|
||||
#include <beast/core/streambuf_readstream.hpp>
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/to_string.hpp>
|
||||
#include <beast/core/to_string.hpp>
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
//
|
||||
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/write_streambuf.hpp>
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/write_streambuf.hpp>
|
||||
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
|
||||
namespace beast {
|
||||
@@ -38,7 +38,3 @@ add_executable (bench-tests
|
||||
nodejs_parser.cpp
|
||||
parser_bench.cpp
|
||||
)
|
||||
|
||||
if (NOT WIN32)
|
||||
target_link_libraries(parser-bench ${Boost_LIBRARIES})
|
||||
endif()
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
#include "message_fuzz.hpp"
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/write_streambuf.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/core/write_streambuf.hpp>
|
||||
#include <beast/core/detail/ci_char_traits.hpp>
|
||||
#include <beast/http/rfc2616.hpp>
|
||||
#include <beast/detail/ci_char_traits.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/utility/string_ref.hpp>
|
||||
#include <cassert>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#ifndef BEAST_HTTP_TEST_MESSAGE_FUZZ_HPP
|
||||
#define BEAST_HTTP_TEST_MESSAGE_FUZZ_HPP
|
||||
|
||||
#include <beast/core/write_streambuf.hpp>
|
||||
#include <beast/http/detail/basic_parser_v1.hpp>
|
||||
#include <beast/write_streambuf.hpp>
|
||||
#include <cstdint>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <beast/unit_test/thread.hpp>
|
||||
#include <beast/placeholders.hpp>
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/placeholders.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/http.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
|
||||
#include "nodejs-parser/http_parser.h"
|
||||
|
||||
#include <beast/error.hpp>
|
||||
#include <beast/http/message_v1.hpp>
|
||||
#include <beast/http/rfc2616.hpp>
|
||||
#include <beast/buffer_concepts.hpp>
|
||||
#include <beast/core/buffer_concepts.hpp>
|
||||
#include <beast/core/error.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
|
||||
#include "nodejs_parser.hpp"
|
||||
#include "message_fuzz.hpp"
|
||||
|
||||
#include <beast/http.hpp>
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/to_string.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/core/to_string.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/http/write.hpp>
|
||||
|
||||
#include <beast/error.hpp>
|
||||
#include <beast/http/headers.hpp>
|
||||
#include <beast/http/message.hpp>
|
||||
#include <beast/http/empty_body.hpp>
|
||||
#include <beast/http/string_body.hpp>
|
||||
#include <beast/http/write.hpp>
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/to_string.hpp>
|
||||
#include <beast/core/error.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/core/to_string.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <string>
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
error_code ec;
|
||||
auto const n = write_some(buffers, ec);
|
||||
if(ec)
|
||||
throw boost::system::system_error{ec};
|
||||
throw system_error{ec};
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include "websocket_async_echo_peer.hpp"
|
||||
#include "websocket_sync_echo_peer.hpp"
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/to_string.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/core/to_string.hpp>
|
||||
#include <beast/test/fail_stream.hpp>
|
||||
#include <beast/test/string_stream.hpp>
|
||||
#include <beast/test/yield_to.hpp>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// Test that header file is self-contained.
|
||||
#include <beast/websocket/detail/utf8_checker.hpp>
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <array>
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#ifndef BEAST_WEBSOCKET_ASYNC_ECHO_PEER_H_INCLUDED
|
||||
#define BEAST_WEBSOCKET_ASYNC_ECHO_PEER_H_INCLUDED
|
||||
|
||||
#include <beast/placeholders.hpp>
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/placeholders.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/websocket.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <functional>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BEAST_WEBSOCKET_SYNC_ECHO_PEER_H_INCLUDED
|
||||
#define BEAST_WEBSOCKET_SYNC_ECHO_PEER_H_INCLUDED
|
||||
|
||||
#include <beast/streambuf.hpp>
|
||||
#include <beast/core/streambuf.hpp>
|
||||
#include <beast/websocket.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <functional>
|
||||
|
||||
Reference in New Issue
Block a user