Use buffers_to_string in tests

fix #782
This commit is contained in:
Vinnie Falco
2018-04-24 10:55:39 -07:00
parent 5abac8b380
commit 14392d7f52
21 changed files with 164 additions and 281 deletions
+1 -13
View File
@@ -16,6 +16,7 @@
#include <boost/beast/http/message.hpp>
#include <boost/beast/http/read.hpp>
#include <boost/beast/http/string_body.hpp>
#include <boost/beast/core/buffers_to_string.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/multi_buffer.hpp>
#include <boost/beast/test/stream.hpp>
@@ -264,19 +265,6 @@ public:
return ss.str();
}
template<class ConstBufferSequence>
static
std::string
to_string(ConstBufferSequence const& bs)
{
std::string s;
s.reserve(buffer_size(bs));
for(auto b : beast::detail::buffers_range(bs))
s.append(reinterpret_cast<char const*>(b),
b.size());
return s;
}
template<bool isRequest>
bool
equal_body(string_view sv, string_view body)