differential code coverage report with master
Current view: top level - source/packaging - relationship.cpp (source / functions) Coverage Total Hit UBC CBC
Current: coverage.info Lines: 100.0 % 24 24 24
Current Date: 2025-12-15 23:01:28 Functions: 100.0 % 9 9 9
Baseline: coverage_master.info Branches: 71.4 % 14 10 8 20
Baseline Date: 2025-12-15 23:01:27

             Branch data    TLA  Line data    Source code
       1                 :                : // Copyright (c) 2014-2022 Thomas Fussell
       2                 :                : // Copyright (c) 2010-2015 openpyxl
       3                 :                : // Copyright (c) 2024-2025 xlnt-community
       4                 :                : //
       5                 :                : // Permission is hereby granted, free of charge, to any person obtaining a copy
       6                 :                : // of this software and associated documentation files (the "Software"), to deal
       7                 :                : // in the Software without restriction, including without limitation the rights
       8                 :                : // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
       9                 :                : // copies of the Software, and to permit persons to whom the Software is
      10                 :                : // furnished to do so, subject to the following conditions:
      11                 :                : //
      12                 :                : // The above copyright notice and this permission notice shall be included in
      13                 :                : // all copies or substantial portions of the Software.
      14                 :                : //
      15                 :                : // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
      16                 :                : // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      17                 :                : // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
      18                 :                : // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      19                 :                : // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      20                 :                : // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
      21                 :                : // THE SOFTWARE
      22                 :                : //
      23                 :                : // @license: http://www.opensource.org/licenses/mit-license.php
      24                 :                : // @author: see AUTHORS file
      25                 :                : 
      26                 :                : #include <xlnt/packaging/relationship.hpp>
      27                 :                : 
      28                 :                : namespace xlnt {
      29                 :                : 
      30         [ +  + ]:CBC        3233 : relationship::relationship()
      31                 :                : {
      32                 :           3233 : }
      33                 :                : 
      34                 :           3191 : relationship::relationship(
      35                 :           3191 :     const std::string &id, relationship_type t, const uri &source, const uri &target, xlnt::target_mode mode)
      36         [ +  + ]:           3191 :     : id_(id), type_(t), source_(source), target_(target), mode_(mode)
      37                 :                : {
      38                 :           3191 : }
      39                 :                : 
      40                 :          11207 : const std::string &relationship::id() const
      41                 :                : {
      42                 :          11207 :     return id_;
      43                 :                : }
      44                 :                : 
      45                 :           1148 : target_mode relationship::target_mode() const
      46                 :                : {
      47                 :           1148 :     return mode_;
      48                 :                : }
      49                 :                : 
      50                 :           4097 : const uri &relationship::source() const
      51                 :                : {
      52                 :           4097 :     return source_;
      53                 :                : }
      54                 :                : 
      55                 :           6443 : const uri &relationship::target() const
      56                 :                : {
      57                 :           6443 :     return target_;
      58                 :                : }
      59                 :                : 
      60                 :          27079 : relationship_type relationship::type() const
      61                 :                : {
      62                 :          27079 :     return type_;
      63                 :                : }
      64                 :                : 
      65                 :           3222 : bool relationship::operator==(const relationship &rhs) const
      66                 :                : {
      67                 :           3222 :     return type_ == rhs.type_
      68         [ +  - ]:           2662 :         && id_ == rhs.id_
      69         [ +  - ]:           2662 :         && source_ == rhs.source_
      70         [ +  - ]:           2662 :         && target_ == rhs.target_
      71   [ +  +  +  - ]:           5884 :         && mode_ == rhs.mode_;
      72                 :                : }
      73                 :                : 
      74                 :            101 : bool relationship::operator!=(const relationship &rhs) const
      75                 :                : {
      76                 :            101 :     return !(*this == rhs);
      77                 :                : }
      78                 :                : 
      79                 :                : } // namespace xlnt
        

Generated by: LCOV version 2.3.1-beta