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

Method readgrind

test/beast/http/read.cpp:442–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440
441 template<class Parser, class Pred>
442 void
443 readgrind(string_view s, Pred&& pred)
444 {
445 for(std::size_t n = 1; n < s.size() - 1; ++n)
446 {
447 Parser p;
448 error_code ec = test::error::test_failure;
449 flat_buffer b;
450 test::stream ts{ioc_};
451 ostream(ts.buffer()) << s;
452 ts.read_size(n);
453 read(ts, b, p, ec);
454 if(! BEAST_EXPECTS(! ec, ec.message()))
455 continue;
456 pred(p);
457 }
458 }
459
460 void
461 testReadGrind()

Callers

nothing calls this directly

Calls 4

read_sizeMethod · 0.80
messageMethod · 0.80
readFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected