mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-22 11:35:49 +00:00
Conform to the Networking TS by renaming the Streambuf concept to DynamicBuffer in all places. Values of types meeting the requirements of DynamicBuffer are renamed to dynabuf. See: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4478.html#requirements.dynamic_buffers * Headers renamed * Formal parameter names renamed * Template argument types renamed * Documentation updated
37 lines
973 B
C++
37 lines
973 B
C++
//
|
|
// 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/write_dynabuf.hpp>
|
|
|
|
#include <beast/core/streambuf.hpp>
|
|
#include <beast/unit_test/suite.hpp>
|
|
|
|
namespace beast {
|
|
|
|
class write_dynabuf_test : public beast::unit_test::suite
|
|
{
|
|
public:
|
|
void run() override
|
|
{
|
|
streambuf sb;
|
|
std::string s;
|
|
write(sb, boost::asio::const_buffer{"", 0});
|
|
write(sb, boost::asio::mutable_buffer{nullptr, 0});
|
|
write(sb, boost::asio::null_buffers{});
|
|
write(sb, boost::asio::const_buffers_1{"", 0});
|
|
write(sb, boost::asio::mutable_buffers_1{nullptr, 0});
|
|
write(sb, s);
|
|
write(sb, 23);
|
|
pass();
|
|
}
|
|
};
|
|
|
|
BEAST_DEFINE_TESTSUITE(write_dynabuf,core,beast);
|
|
|
|
} // beast
|