Skip to content

Commit

Permalink
update code for Buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
cmazakas committed Mar 25, 2024
1 parent 7ef2545 commit 2c416c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/unit/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <boost/http_proto/request_parser.hpp>
#include <boost/http_proto/response_parser.hpp>
#include <boost/http_proto/service/zlib_service.hpp>
#include <boost/buffers/buffer.hpp>
#include <boost/buffers/buffer_copy.hpp>
#include <boost/buffers/buffer_size.hpp>
#include <boost/buffers/flat_buffer.hpp>
#include <boost/buffers/make_buffer.hpp>
#include <boost/buffers/string_buffer.hpp>
#include <boost/core/ignore_unused.hpp>
#include <vector>
Expand Down Expand Up @@ -238,7 +238,7 @@ struct parser_test
auto const n =
buffers::buffer_copy(
pr.prepare(),
buffers::buffer(
buffers::make_buffer(
s.data(), s.size()));
pr.commit(n);
s.remove_prefix(n);
Expand Down Expand Up @@ -304,7 +304,7 @@ struct parser_test
auto const n =
buffers::buffer_copy(
pr.prepare(),
buffers::buffer(
buffers::make_buffer(
s.data(), s.size()));
pr.commit(n);
BOOST_TEST_EQ(n, s.size());
Expand Down
8 changes: 4 additions & 4 deletions test/unit/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#include <boost/http_proto/response.hpp>
#include <boost/http_proto/string_body.hpp>
#include <boost/buffers/buffer.hpp>
#include <boost/buffers/buffer_copy.hpp>
#include <boost/buffers/buffer_size.hpp>
#include <boost/buffers/const_buffer.hpp>
#include <boost/buffers/make_buffer.hpp>
#include <boost/buffers/mutable_buffer.hpp>
#include <boost/core/ignore_unused.hpp>
#include "test_helpers.hpp"
Expand Down Expand Up @@ -47,7 +47,7 @@ struct serializer_test
rv.bytes =
buffers::buffer_copy(
b,
buffers::buffer(
buffers::make_buffer(
s_.data(),
s_.size()));
s_ = s_.substr(rv.bytes);
Expand Down Expand Up @@ -337,7 +337,7 @@ struct serializer_test
"\r\n",
test_source{std::string(2048, '*')},
[](core::string_view s){
core::string_view expected_header =
core::string_view expected_header =
"HTTP/1.1 200 OK\r\n"
"Server: test\r\n"
"Transfer-Encoding: chunked\r\n"
Expand All @@ -355,7 +355,7 @@ struct serializer_test
"\r\n",
test_source{""},
[](core::string_view s){
core::string_view expected_header =
core::string_view expected_header =
"HTTP/1.1 200 OK\r\n"
"Server: test\r\n"
"Transfer-Encoding: chunked\r\n"
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include <boost/http_proto/fields.hpp>
#include <boost/http_proto/request.hpp>
#include <boost/http_proto/response.hpp>
#include <boost/buffers/buffer.hpp>
#include <boost/buffers/buffer_copy.hpp>
#include <boost/buffers/buffer_size.hpp>
#include <boost/buffers/make_buffer.hpp>
#include <boost/url/grammar/parse.hpp>
#include <boost/core/detail/string_view.hpp>

Expand Down Expand Up @@ -43,7 +43,7 @@ test_to_string(Buffers const& bs)
std::string s(
buffers::buffer_size(bs), 0);
s.resize(buffers::buffer_copy(
buffers::buffer(&s[0], s.size()),
buffers::make_buffer(&s[0], s.size()),
bs));
return s;
}
Expand Down

0 comments on commit 2c416c9

Please sign in to comment.