GCC Code Coverage Report


Directory: libs/url/
File: libs/url/src/params_view.cpp
Date: 2024-03-08 17:32:04
Exec Total Coverage
Lines: 20 20 100.0%
Functions: 4 4 100.0%
Branches: 3 4 75.0%

Line Branch Exec Source
1 //
2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // Official repository: https://github.com/CPPAlliance/url
9 //
10
11
12 #include <boost/url/detail/config.hpp>
13 #include <boost/url/params_view.hpp>
14 #include <boost/url/parse_query.hpp>
15
16 namespace boost {
17 namespace urls {
18
19 172 params_view::
20 params_view(
21 detail::query_ref const& ref,
22 172 encoding_opts opt) noexcept
23 172 : params_base(ref, opt)
24 {
25 172 }
26
27 //------------------------------------------------
28
29 6 params_view::
30 params_view(
31 params_view const& other,
32 6 encoding_opts opt) noexcept
33 6 : params_base(other.ref_, opt)
34 {
35 6 }
36
37 11 params_view::
38 params_view(
39 11 core::string_view s)
40 : params_view(
41 17 parse_query(s).value(
42
2/2
✓ Branch 2 taken 5 times.
✓ Branch 3 taken 6 times.
11 BOOST_URL_POS),
43 16 {true, false, false})
44 {
45 5 }
46
47 1 params_view::
48 params_view(
49 core::string_view s,
50 1 encoding_opts opt)
51 : params_view(
52 1 parse_query(s).value(
53
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
1 BOOST_URL_POS),
54 1 opt)
55 {
56 1 }
57
58 } // urls
59 } // boost
60
61