buffers_cat replaces buffer_cat (API Change):

fix #773

* buffer_cat is renamed to buffers_cat
* buffer_cat_view is renamed to buffers_cat_view

Actions Required:

* Use buffers_cat instead of buffer_cat
* Use buffers_cat_view instead of buffer_cat_view
This commit is contained in:
Vinnie Falco committed 2017-09-15 12:52:59 -07:00
1 parent 38c2816539
commit 06fb2b9dfc
17 files changed
+90 -86

No files matched your search

+1 -1
View File
@@ -20,9 +20,9 @@ add_executable (tests-beast-core
file_test.hpp
async_result.cpp
bind_handler.cpp
buffer_cat.cpp
buffered_read_stream.cpp
buffers_adapter.cpp
buffers_cat.cpp
buffers_prefix.cpp
buffers_suffix.cpp
error.cpp
+1 -1
View File
@@ -10,9 +10,9 @@
local SOURCES =
async_result.cpp
bind_handler.cpp
buffer_cat.cpp
buffered_read_stream.cpp
buffers_adapter.cpp
buffers_cat.cpp
buffers_prefix.cpp
buffers_suffix.cpp
error.cpp
@@ -8,7 +8,7 @@
//
// Test that header file is self-contained.
#include <boost/beast/core/buffer_cat.hpp>
#include <boost/beast/core/buffers_cat.hpp>
#include <boost/beast/unit_test/suite.hpp>
#include <boost/asio/buffer.hpp>
@@ -21,7 +21,7 @@
namespace boost {
namespace beast {
class buffer_cat_test : public unit_test::suite
class buffers_cat_test : public unit_test::suite
{
public:
template<class Iterator>
@@ -100,7 +100,7 @@ public:
std::list<const_buffer> b5{
const_buffer{buf+9, 1}};
std::list<const_buffer> b6;
auto bs = buffer_cat(
auto bs = buffers_cat(
b1, b2, b3, b4, b5, b6);
BEAST_EXPECT(buffer_size(bs) == 10);
BEAST_EXPECT(bsize1(bs) == 10);
@@ -116,11 +116,11 @@ public:
auto bs3(std::move(bs));
{
boost::asio::streambuf sb1, sb2;
BEAST_EXPECT(buffer_size(buffer_cat(
BEAST_EXPECT(buffer_size(buffers_cat(
sb1.prepare(5), sb2.prepare(7))) == 12);
sb1.commit(5);
sb2.commit(7);
BEAST_EXPECT(buffer_size(buffer_cat(
BEAST_EXPECT(buffer_size(buffers_cat(
sb1.data(), sb2.data())) == 12);
}
for(auto it = bs.begin(); it != bs.end(); ++it)
@@ -145,7 +145,7 @@ public:
const_buffer{buf+3, 1},
const_buffer{buf+4, 2},
const_buffer{buf+6, 3}}};
auto bs = buffer_cat(b1, b2);
auto bs = buffers_cat(b1, b2);
for(int n = 0;
n <= std::distance(bs.begin(), bs.end()); ++n)
{
@@ -243,7 +243,7 @@ public:
// sequences results in a mutable buffer sequence
BOOST_STATIC_ASSERT(std::is_same<
mutable_buffer,
decltype(buffer_cat(
decltype(buffers_cat(
std::declval<mutable_buffer>(),
std::declval<user_defined>(),
std::declval<mutable_buffer>()
@@ -253,7 +253,7 @@ public:
// sequences results in a const buffer sequence.
BOOST_STATIC_ASSERT(std::is_same<
const_buffer,
decltype(buffer_cat(
decltype(buffers_cat(
std::declval<mutable_buffer>(),
std::declval<user_defined>(),
std::declval<const_buffer>()
@@ -264,7 +264,7 @@ public:
}
};
BEAST_DEFINE_TESTSUITE(beast,core,buffer_cat);
BEAST_DEFINE_TESTSUITE(beast,core,buffers_cat);
} // beast
} // boost
+2 -2
View File
@@ -12,7 +12,7 @@
#include "buffer_test.hpp"
#include <boost/beast/core/buffer_cat.hpp>
#include <boost/beast/core/buffers_cat.hpp>
#include <boost/beast/core/ostream.hpp>
#include <boost/beast/unit_test/suite.hpp>
#include <boost/asio/buffer.hpp>
@@ -133,7 +133,7 @@ public:
testInPlace()
{
using namespace test;
buffers_suffix<buffer_cat_view<
buffers_suffix<buffers_cat_view<
boost::asio::const_buffers_1,
boost::asio::const_buffers_1>> cb(
boost::in_place_init,
+4 -4
View File
@@ -13,7 +13,7 @@
#include "message_fuzz.hpp"
#include "test_parser.hpp"
#include <boost/beast/core/buffer_cat.hpp>
#include <boost/beast/core/buffers_cat.hpp>
#include <boost/beast/core/buffers_prefix.hpp>
#include <boost/beast/core/buffers_suffix.hpp>
#include <boost/beast/core/multi_buffer.hpp>
@@ -193,7 +193,7 @@ public:
error_code ec;
buffers_suffix<ConstBufferSequence> cb{buffers};
cb.consume(i);
auto n = p.put(buffer_cat(
auto n = p.put(buffers_cat(
buffers_prefix(i, buffers), cb), ec);
if(! BEAST_EXPECTS(! ec, ec.message()))
continue;
@@ -265,7 +265,7 @@ public:
Parser p;
p.eager(true);
error_code ec;
p.put(buffer_cat(
p.put(buffers_cat(
boost::asio::const_buffers_1{msg.data(), i},
boost::asio::const_buffers_1{
msg.data() + i, msg.size() - i}), ec);
@@ -948,7 +948,7 @@ public:
"hello",
expect_body(*this, "hello"));
parsegrind<test_parser<true>>(buffer_cat(
parsegrind<test_parser<true>>(buffers_cat(
buf("GET / HTTP/1.1\r\n"
"Content-Length: 10\r\n"
"\r\n"),