GCC Code Coverage Report


Directory: libs/url/
File: libs/url/src/params_view.cpp
Date: 2024-01-19 15:42:54
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 #ifndef BOOST_URL_IMPL_PARAMS_VIEW_IPP
12 #define BOOST_URL_IMPL_PARAMS_VIEW_IPP
13
14 #include <boost/url/detail/config.hpp>
15 #include <boost/url/params_view.hpp>
16 #include <boost/url/parse_query.hpp>
17
18 namespace boost {
19 namespace urls {
20
21 172 params_view::
22 params_view(
23 detail::query_ref const& ref,
24 172 encoding_opts opt) noexcept
25 172 : params_base(ref, opt)
26 {
27 172 }
28
29 //------------------------------------------------
30
31 6 params_view::
32 params_view(
33 params_view const& other,
34 6 encoding_opts opt) noexcept
35 6 : params_base(other.ref_, opt)
36 {
37 6 }
38
39 11 params_view::
40 params_view(
41 11 core::string_view s)
42 : params_view(
43 17 parse_query(s).value(
44
2/2
✓ Branch 2 taken 5 times.
✓ Branch 3 taken 6 times.
11 BOOST_URL_POS),
45 16 {true, false, false})
46 {
47 5 }
48
49 1 params_view::
50 params_view(
51 core::string_view s,
52 1 encoding_opts opt)
53 : params_view(
54 1 parse_query(s).value(
55
1/2
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
1 BOOST_URL_POS),
56 1 opt)
57 {
58 1 }
59
60 } // urls
61 } // boost
62
63 #endif
64