]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/beast/test/beast/core/detail/clamp.cpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / libs / beast / test / beast / core / detail / clamp.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/detail/clamp.hpp>
12
13 #include <boost/beast/unit_test/suite.hpp>
14 #include <climits>
15
16 namespace boost {
17 namespace beast {
18 namespace detail {
19
20 class clamp_test : public beast::unit_test::suite
21 {
22 public:
23 void testClamp()
24 {
25 BEAST_EXPECT(clamp(
26 (std::numeric_limits<std::uint64_t>::max)()) ==
27 (std::numeric_limits<std::size_t>::max)());
28 }
29
30 void run() override
31 {
32 testClamp();
33 }
34 };
35
36 BEAST_DEFINE_TESTSUITE(beast,core,clamp);
37
38 } // detail
39 } // beast
40 } // boost