]>
Commit | Line | Data |
---|---|---|
1 | // | |
2 | // Copyright (c) 2013-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 | ||
8 | // Test that header file is self-contained. | |
9 | #include <beast/core/detail/clamp.hpp> | |
10 | ||
11 | #include <beast/unit_test/suite.hpp> | |
12 | #include <climits> | |
13 | ||
14 | namespace beast { | |
15 | namespace detail { | |
16 | ||
17 | class clamp_test : public beast::unit_test::suite | |
18 | { | |
19 | public: | |
20 | void testClamp() | |
21 | { | |
22 | BEAST_EXPECT(clamp( | |
23 | (std::numeric_limits<std::uint64_t>::max)()) == | |
24 | (std::numeric_limits<std::size_t>::max)()); | |
25 | } | |
26 | ||
27 | void run() override | |
28 | { | |
29 | testClamp(); | |
30 | } | |
31 | }; | |
32 | ||
33 | BEAST_DEFINE_TESTSUITE(clamp,core,beast); | |
34 | ||
35 | } // detail | |
36 | } // beast | |
37 |