MCPcopy Create free account
hub / github.com/boostorg/beast / testFunction

Method testFunction

test/beast/core/buffer_traits.cpp:206–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 void
207 testFunction()
208 {
209 BEAST_EXPECT(buffer_bytes(
210 net::const_buffer("Hello, world!", 13)) == 13);
211
212 BEAST_EXPECT(buffer_bytes(
213 net::mutable_buffer{}) == 0);
214
215 {
216 sequence s;
217 BEAST_EXPECT(buffer_bytes(s) == 13);
218 }
219
220 {
221 std::array<net::const_buffer, 2> s({{
222 net::const_buffer("Hello, world!", 13),
223 net::const_buffer("Hello, world!", 13)}});
224 BEAST_EXPECT(buffer_bytes(s) == 26);
225 }
226
227 BOOST_CORE_STATIC_ASSERT(! detail::is_invocable<
228 detail::buffer_bytes_impl,
229 std::size_t(not_sequence const&)>::value);
230 }
231
232 void run() override
233 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected