cppalliance / http_proto

HTTP/1 parsing and serialization algorithms using C++11
https://develop.http-proto.cpp.al/
Boost Software License 1.0
23 stars 10 forks source link

request.cpp coverage #64

Closed cmazakas closed 6 months ago

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.23%. Comparing base (e1b4aa1) to head (e0131a6).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cppalliance/http_proto/pull/64/graphs/tree.svg?width=650&height=150&src=pr&token=IoZbqjUnBr&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance)](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ```diff @@ Coverage Diff @@ ## develop #64 +/- ## =========================================== + Coverage 85.45% 86.23% +0.77% =========================================== Files 77 77 Lines 4269 4271 +2 =========================================== + Hits 3648 3683 +35 + Misses 621 588 -33 ``` | [Files](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) | Coverage Δ | | |---|---|---| | [src/detail/header.cpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL2RldGFpbC9oZWFkZXIuY3Bw) | `94.01% <100.00%> (ø)` | | | [src/request.cpp](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-c3JjL3JlcXVlc3QuY3Bw) | `100.00% <100.00%> (+25.00%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/cppalliance/http_proto/pull/64/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Last update [e1b4aa1...e0131a6](https://app.codecov.io/gh/cppalliance/http_proto/pull/64?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance).
cppalliance-bot commented 7 months ago

GCOVR code coverage report https://64.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://64.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://64.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 7 months ago

GCOVR code coverage report https://64.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://64.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://64.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 7 months ago

GCOVR code coverage report https://64.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://64.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://64.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 7 months ago

GCOVR code coverage report https://64.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://64.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://64.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

vinniefalco commented 7 months ago

"Expectations" is capitalized but isn't a well-known field name

cppalliance-bot commented 7 months ago

GCOVR code coverage report https://64.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://64.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://64.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

cppalliance-bot commented 6 months ago

GCOVR code coverage report https://64.http-proto.prtest.cppalliance.org/gcovr/index.html
LCOV code coverage report https://64.http-proto.prtest.cppalliance.org/genhtml/index.html Coverage Diff https://64.http-proto.prtest.cppalliance.org/gcovr/coverage_diff.txt

vinniefalco commented 6 months ago

Pull request looks good to merge.

When writing these tests you might find it helpful to author some utility functions. For example this:

BOOST_TEST( ! req.metadata().expect.ec.failed() );
BOOST_TEST( req.metadata().expect.is_100_continue );
BOOST_TEST_EQ( req.count("Expect"), 1 );

might be expressed as

ok( req, true, 1 );

and

BOOST_TEST( req.metadata().expect.ec.failed() );
BOOST_TEST_EQ( req.count("Expect"), 2 );

might be expressed as

bad( req, 2 );