File Coverage

inc/Marpa/R2/Test.pm
Criterion Covered Total %
statement 17 19 89.4
branch 2 4 50.0
condition 1 3 33.3
subroutine 7 7 100.0
pod 0 1 0.0
total 27 34 79.4


line stmt bran cond sub pod time code
1             # Copyright 2022 Jeffrey Kegler
2             # This file is part of Marpa::R2. Marpa::R2 is free software: you can
3             # redistribute it and/or modify it under the terms of the GNU Lesser
4             # General Public License as published by the Free Software Foundation,
5             # either version 3 of the License, or (at your option) any later version.
6             #
7             # Marpa::R2 is distributed in the hope that it will be useful,
8             # but WITHOUT ANY WARRANTY; without even the implied warranty of
9             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10             # Lesser General Public License for more details.
11             #
12             # You should have received a copy of the GNU Lesser
13             # General Public License along with Marpa::R2. If not, see
14             # http://www.gnu.org/licenses/.
15              
16             package Marpa::R2::Test;
17              
18 130     130   9570675 use 5.010001;
  130         1681  
19 130     130   736 use strict;
  130         222  
  130         2737  
20 130     130   600 use warnings;
  130         210  
  130         3448  
21              
22 130     130   77227 use Data::Dumper;
  130         818010  
  130         11043  
23              
24             Marpa::R2::exception('Test::More not loaded')
25             if not defined &Test::More::is;
26              
27             BEGIN {
28             ## no critic (BuiltinFunctions::ProhibitStringyEval)
29             ## no critic (ErrorHandling::RequireCheckingReturnValueOfEval)
30 130     130   6697 eval 'use Test::Differences';
  130     130   34930  
  0         0  
  0         0  
31             }
32              
33             sub Marpa::R2::Test::is {
34 518 50 33 518 0 155088 goto &Test::Differences::eq_or_diff
35             if defined &Test::Differences::eq_or_diff && @_ > 1;
36 518 50       1445 @_ = map { ref $_ ? Data::Dumper::Dumper(@_) : $_ } @_;
  1554         4210  
37 518         3128 goto &Test::More::is;
38             } ## end sub Marpa::R2::Test::is
39              
40             1;
41