mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 21:07:26 +02:00
Don't include OpenSSL for core snippets
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
Version 200
|
||||
|
||||
* Don't include OpenSSL for core snippets
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Version 199:
|
||||
|
||||
* Workarounds for msvc-14
|
||||
|
@ -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")
|
||||
|
@ -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 ;
|
||||
|
@ -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<class DynamicBuffer>
|
||||
@ -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
|
@ -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 <boost/beast/core.hpp>
|
||||
|
Reference in New Issue
Block a user