forked from boostorg/beast
Boost prep
This commit is contained in:
+20
-16
@@ -4,15 +4,18 @@
|
||||
// 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)
|
||||
//
|
||||
// Official repository: https://github.com/boostorg/beast
|
||||
//
|
||||
|
||||
#include "example/common/detect_ssl.hpp"
|
||||
|
||||
#include <beast/core/flat_buffer.hpp>
|
||||
#include <beast/core/ostream.hpp>
|
||||
#include <beast/test/pipe_stream.hpp>
|
||||
#include <beast/test/yield_to.hpp>
|
||||
#include <beast/unit_test/suite.hpp>
|
||||
#include <boost/beast/core/flat_buffer.hpp>
|
||||
#include <boost/beast/core/ostream.hpp>
|
||||
#include <boost/beast/test/pipe_stream.hpp>
|
||||
#include <boost/beast/test/yield_to.hpp>
|
||||
#include <boost/beast/unit_test/suite.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace beast {
|
||||
namespace http {
|
||||
|
||||
@@ -29,18 +32,18 @@ public:
|
||||
buf[1] = 0;
|
||||
buf[2] = 0;
|
||||
buf[3] = 0;
|
||||
BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
BOOST_BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
boost::asio::buffer(buf, 0))));
|
||||
BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
BOOST_BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
boost::asio::buffer(buf, 1))));
|
||||
BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
BOOST_BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
boost::asio::buffer(buf, 2))));
|
||||
BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
BOOST_BEAST_EXPECT(boost::indeterminate(is_ssl_handshake(
|
||||
boost::asio::buffer(buf, 3))));
|
||||
BEAST_EXPECT(is_ssl_handshake(
|
||||
BOOST_BEAST_EXPECT(is_ssl_handshake(
|
||||
boost::asio::buffer(buf, 4)));
|
||||
buf[0] = 0;
|
||||
BEAST_EXPECT(! is_ssl_handshake(
|
||||
BOOST_BEAST_EXPECT(! is_ssl_handshake(
|
||||
boost::asio::buffer(buf, 1)));
|
||||
}
|
||||
|
||||
@@ -54,8 +57,8 @@ public:
|
||||
error_code ec;
|
||||
flat_buffer b;
|
||||
auto const result = detect_ssl(p.server, b, ec);
|
||||
BEAST_EXPECTS(! ec, ec.message());
|
||||
BEAST_EXPECT(result);
|
||||
BOOST_BEAST_EXPECTS(! ec, ec.message());
|
||||
BOOST_BEAST_EXPECT(result);
|
||||
}
|
||||
yield_to(
|
||||
[&](yield_context yield)
|
||||
@@ -66,8 +69,8 @@ public:
|
||||
error_code ec;
|
||||
flat_buffer b;
|
||||
auto const result = async_detect_ssl(p.server, b, yield[ec]);
|
||||
BEAST_EXPECTS(! ec, ec.message());
|
||||
BEAST_EXPECT(result);
|
||||
BOOST_BEAST_EXPECTS(! ec, ec.message());
|
||||
BOOST_BEAST_EXPECT(result);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,7 +82,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(doc_core_samples,core,beast);
|
||||
BOOST_BEAST_DEFINE_TESTSUITE(doc_core_samples,core,beast);
|
||||
|
||||
} // http
|
||||
} // beast
|
||||
} // boost
|
||||
|
||||
Reference in New Issue
Block a user