]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/beast/test/beast/core/read_size.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / beast / test / beast / core / read_size.cpp
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
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)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9
10 // Test that header file is self-contained.
11 #include <boost/beast/core/read_size.hpp>
12
13 #include <boost/beast/core/flat_buffer.hpp>
14 #include <boost/beast/core/flat_static_buffer.hpp>
15 #include <boost/beast/core/multi_buffer.hpp>
16 #include <boost/beast/core/static_buffer.hpp>
17 #include <boost/beast/unit_test/suite.hpp>
18
19 #include <boost/asio/streambuf.hpp>
20
21 namespace boost {
22 namespace beast {
23
24 class read_size_test : public beast::unit_test::suite
25 {
26 public:
27 template<class DynamicBuffer>
28 void
29 check()
30 {
31 DynamicBuffer buffer;
32 read_size(buffer, 65536);
33 pass();
34 }
35
36 void
37 run() override
38 {
39 check<flat_buffer>();
40 check<flat_static_buffer<1024>>();
41 check<multi_buffer>();
42 check<static_buffer<1024>>();
43 check<boost::asio::streambuf>();
44 }
45 };
46
47 BEAST_DEFINE_TESTSUITE(beast,core,read_size);
48
49 } // beast
50 } // boost