From 49c5f7c30f3a124ead30b9c24c31b402ce5ace21 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 14 Dec 2018 07:27:46 -0800 Subject: [PATCH] Don't include OpenSSL for core snippets --- CHANGELOG.md | 6 ++++++ test/beast/core/CMakeLists.txt | 12 ++++++------ test/beast/core/Jamfile | 12 ++++++------ .../{detail/base64.cpp => detail_base64.cpp} | 0 .../core/{buffer.cpp => detail_buffer.cpp} | 18 +++++++----------- .../{detail/clamp.cpp => detail_clamp.cpp} | 0 .../core/{detail/sha1.cpp => detail_sha1.cpp} | 0 .../{detail/variant.cpp => detail_variant.cpp} | 0 .../{detail/varint.cpp => detail_varint.cpp} | 0 test/doc/core_snippets.cpp | 7 +++++++ 10 files changed, 32 insertions(+), 23 deletions(-) rename test/beast/core/{detail/base64.cpp => detail_base64.cpp} (100%) rename test/beast/core/{buffer.cpp => detail_buffer.cpp} (76%) rename test/beast/core/{detail/clamp.cpp => detail_clamp.cpp} (100%) rename test/beast/core/{detail/sha1.cpp => detail_sha1.cpp} (100%) rename test/beast/core/{detail/variant.cpp => detail_variant.cpp} (100%) rename test/beast/core/{detail/varint.cpp => detail_varint.cpp} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 144c08e9..5bf6b29d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Version 200 + +* Don't include OpenSSL for core snippets + +-------------------------------------------------------------------------------- + Version 199: * Workarounds for msvc-14 diff --git a/test/beast/core/CMakeLists.txt b/test/beast/core/CMakeLists.txt index 830ea96e..4bf45a53 100644 --- a/test/beast/core/CMakeLists.txt +++ b/test/beast/core/CMakeLists.txt @@ -19,7 +19,6 @@ add_executable (tests-beast-core buffer_test.hpp file_test.hpp bind_handler.cpp - buffer.cpp buffer_traits.cpp buffered_read_stream.cpp buffers_adapter.cpp @@ -45,13 +44,14 @@ add_executable (tests-beast-core static_buffer.cpp string_param.cpp type_traits.cpp + detail_base64.cpp + detail_buffer.cpp + detail_clamp.cpp detail_read.cpp + detail_sha1.cpp detail_tuple.cpp - detail/base64.cpp - detail/clamp.cpp - detail/sha1.cpp - detail/variant.cpp - detail/varint.cpp + detail_variant.cpp + detail_varint.cpp ) set_property(TARGET tests-beast-core PROPERTY FOLDER "tests") diff --git a/test/beast/core/Jamfile b/test/beast/core/Jamfile index 911ad5ff..bce23255 100644 --- a/test/beast/core/Jamfile +++ b/test/beast/core/Jamfile @@ -9,7 +9,6 @@ local SOURCES = bind_handler.cpp - buffer.cpp buffer_traits.cpp buffered_read_stream.cpp buffers_adapter.cpp @@ -35,13 +34,14 @@ local SOURCES = string.cpp string_param.cpp type_traits.cpp + detail_base64.cpp + detail_buffer.cpp + detail_clamp.cpp detail_read.cpp + detail_sha1.cpp detail_tuple.cpp - detail/base64.cpp - detail/clamp.cpp - detail/sha1.cpp - detail/variant.cpp - detail/varint.cpp + detail_variant.cpp + detail_varint.cpp ; local RUN_TESTS ; diff --git a/test/beast/core/detail/base64.cpp b/test/beast/core/detail_base64.cpp similarity index 100% rename from test/beast/core/detail/base64.cpp rename to test/beast/core/detail_base64.cpp diff --git a/test/beast/core/buffer.cpp b/test/beast/core/detail_buffer.cpp similarity index 76% rename from test/beast/core/buffer.cpp rename to test/beast/core/detail_buffer.cpp index 74aabf2a..2471e328 100644 --- a/test/beast/core/buffer.cpp +++ b/test/beast/core/detail_buffer.cpp @@ -19,11 +19,12 @@ namespace boost { namespace beast { +namespace detail { // VFALCO No idea why boost::system::errc::message_size fails // to compile, so we use net::error::eof instead. // -class buffer_test : public beast::unit_test::suite +class detail_buffer_test : public beast::unit_test::suite { public: template @@ -33,18 +34,15 @@ public: #ifndef BOOST_NO_EXCEPTIONS error_code ec; DynamicBuffer b(32); - detail::dynamic_buffer_prepare(b, 20, ec, - //boost::system::errc::message_size); + dynamic_buffer_prepare(b, 20, ec, net::error::eof); BEAST_EXPECTS(! ec, ec.message()); b.commit(20); auto const result = - detail::dynamic_buffer_prepare(b, 20, ec, - //boost::system::errc::message_size); + dynamic_buffer_prepare(b, 20, ec, net::error::eof); BEAST_EXPECT(result == boost::none); BEAST_EXPECTS( - //ec == boost::system::errc::message_size, ec == net::error::eof, ec.message()); #else fail("exceptions disabled", __FILE__, __LINE__); @@ -57,18 +55,15 @@ public: { error_code ec; DynamicBuffer b(32); - detail::dynamic_buffer_prepare_noexcept(b, 20, ec, - //boost::system::errc::message_size); + dynamic_buffer_prepare_noexcept(b, 20, ec, net::error::eof); BEAST_EXPECTS(! ec, ec.message()); b.commit(20); auto const result = detail::dynamic_buffer_prepare_noexcept(b, 20, ec, - //boost::system::errc::message_size); net::error::eof); BEAST_EXPECT(result == boost::none); BEAST_EXPECTS( - //ec == boost::system::errc::message_size, ec == net::error::eof, ec.message()); } @@ -81,7 +76,8 @@ public: } }; -BEAST_DEFINE_TESTSUITE(beast,core,buffer); +BEAST_DEFINE_TESTSUITE(beast,core,detail_buffer); +} // detail } // beast } // boost diff --git a/test/beast/core/detail/clamp.cpp b/test/beast/core/detail_clamp.cpp similarity index 100% rename from test/beast/core/detail/clamp.cpp rename to test/beast/core/detail_clamp.cpp diff --git a/test/beast/core/detail/sha1.cpp b/test/beast/core/detail_sha1.cpp similarity index 100% rename from test/beast/core/detail/sha1.cpp rename to test/beast/core/detail_sha1.cpp diff --git a/test/beast/core/detail/variant.cpp b/test/beast/core/detail_variant.cpp similarity index 100% rename from test/beast/core/detail/variant.cpp rename to test/beast/core/detail_variant.cpp diff --git a/test/beast/core/detail/varint.cpp b/test/beast/core/detail_varint.cpp similarity index 100% rename from test/beast/core/detail/varint.cpp rename to test/beast/core/detail_varint.cpp diff --git a/test/doc/core_snippets.cpp b/test/doc/core_snippets.cpp index 9acfb912..131a73af 100644 --- a/test/doc/core_snippets.cpp +++ b/test/doc/core_snippets.cpp @@ -7,6 +7,13 @@ // Official repository: https://github.com/boostorg/beast // +// prevent ssl.hpp from actually being included, +// otherwise we would need OpenSSL on AppVeyor +#ifndef BOOST_ASIO_SSL_HPP +#define BOOST_ASIO_SSL_HPP +namespace boost { namespace asio { namespace ssl { } } } +#endif + //[snippet_core_1a #include