GCC Code Coverage Report


Directory: ./
File: libs/http_proto/src/rfc/content_disposition_rule.cpp
Date: 2025-12-23 17:59:41
Exec Total Coverage
Lines: 8 9 88.9%
Functions: 1 1 100.0%
Branches: 3 4 75.0%

Line Branch Exec Source
1 //
2 // Copyright (c) 2025 Mohammad Nejati
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/cppalliance/http_proto
8 //
9
10 #include <boost/http_proto/rfc/content_disposition_rule.hpp>
11 #include <boost/http_proto/rfc/token_rule.hpp>
12 #include <boost/http_proto/rfc/parameter.hpp>
13
14 namespace boost {
15 namespace http_proto {
16 namespace implementation_defined {
17 auto
18 22 content_disposition_rule_t::
19 parse(
20 char const*& it,
21 char const* end) const noexcept->
22 system::result<value_type>
23 {
24 22 auto type = grammar::parse(it, end, token_rule);
25
2/2
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 18 times.
22 if(!type)
26 4 return type.error();
27
28 18 auto params = grammar::parse(it, end, parameters_rule);
29
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 18 times.
18 if(!params)
30 return params.error();
31
32 18 return value_type{ *type, *params };
33 18 }
34
35 } // implementation_defined
36 } // http_proto
37 } // boost
38