Move clamp to core

This commit is contained in:
Vinnie Falco committed 2017-07-20 08:12:13 -07:00
1 parent a878165e36
commit a2ea4f38c1
9 files changed
+71 -50

No files matched your search

+1
View File
@@ -15,6 +15,7 @@ add_executable (core-tests
buffer_cat.cpp
buffer_concepts.cpp
buffers_adapter.cpp
clamp.cpp
consuming_buffers.cpp
dynabuf_readstream.cpp
error.cpp
+37
View File
@@ -0,0 +1,37 @@
//
// 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/detail/clamp.hpp>
#include <beast/unit_test/suite.hpp>
#include <climits>
namespace beast {
namespace detail {
class clamp_test : public beast::unit_test::suite
{
public:
void testClamp()
{
BEAST_EXPECT(clamp(
std::numeric_limits<std::uint64_t>::max()) ==
std::numeric_limits<std::size_t>::max());
}
void run() override
{
testClamp();
}
};
BEAST_DEFINE_TESTSUITE(clamp,core,beast);
} // detail
} // beast