2 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 // Test that header file is self-contained.
11 #include <boost/beast/http/buffer_body.hpp>
13 #include <boost/beast/core/flat_buffer.hpp>
14 #include <boost/beast/core/ostream.hpp>
15 #include <boost/beast/http/parser.hpp>
16 #include <boost/beast/http/read.hpp>
18 #include <boost/beast/_experimental/unit_test/suite.hpp>
19 #include <boost/beast/_experimental/test/stream.hpp>
25 class buffer_body_test : public beast::unit_test::suite
33 ostream(ts.buffer()) <<
35 "Content-Length:3\r\n"
40 response_parser<buffer_body> p;
42 p.get().body().data = buf;
43 p.get().body().size = sizeof(buf);
44 read_header(ts, fb, p, ec);
45 auto const bytes_transferred =
47 BEAST_EXPECTS(! ec, ec.message());
49 // VFALCO What should the read algorithms return?
50 //BEAST_EXPECT(bytes_transferred == 3);
60 BEAST_DEFINE_TESTSUITE(beast,http,buffer_body);