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 -1
View File
@@ -20,6 +20,7 @@ unit-test core-tests :
core/buffer_cat.cpp
core/buffer_concepts.cpp
core/buffers_adapter.cpp
core/clamp.cpp
core/consuming_buffers.cpp
core/dynabuf_readstream.cpp
core/error.cpp
@@ -78,7 +79,6 @@ unit-test websocket-tests :
websocket/teardown.cpp
websocket/frame.cpp
websocket/mask.cpp
websocket/stream_base.cpp
websocket/utf8_checker.cpp
;
+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
@@ -6,22 +6,20 @@
//
// Test that header file is self-contained.
#include <beast/websocket/detail/stream_base.hpp>
#include <beast/core/detail/clamp.hpp>
#include <beast/unit_test/suite.hpp>
#include <initializer_list>
#include <climits>
namespace beast {
namespace websocket {
namespace detail {
class stream_base_test : public beast::unit_test::suite
class clamp_test : public beast::unit_test::suite
{
public:
void testClamp()
{
BEAST_EXPECT(detail::clamp(
BEAST_EXPECT(clamp(
std::numeric_limits<std::uint64_t>::max()) ==
std::numeric_limits<std::size_t>::max());
}
@@ -32,9 +30,8 @@ public:
}
};
BEAST_DEFINE_TESTSUITE(stream_base,websocket,beast);
BEAST_DEFINE_TESTSUITE(clamp,core,beast);
} // detail
} // websocket
} // beast
-1
View File
@@ -17,7 +17,6 @@ add_executable (websocket-tests
teardown.cpp
frame.cpp
mask.cpp
stream_base.cpp
utf8_checker.cpp
)