Lite/t/bug75976.t

filter: Statementstmt 100% 25 / 25 Branchbran 62.5% 5 / 8 Conditioncond 100% 4 / 4 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 93.1% 41 / 44 CC 2 SCAR 3.2
CC
2
Cov
92%
END
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Lite/Util/t/addconst.t ↑ Summary Lite/Util/t/bcd2bin.t »
1  
2 1 ▶BEGIN { $| = 1; print "1..7\n"; }
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶END {print "not ok 1\n" unless $loaded;}
Subroutine END: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
unless $loaded 0 1 1
4  
5 1 $loaded = 1;
6 1 print "ok 1\n";
7  
8 #use diagnostics;
9 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 $| = 1;
12  
13 1 my $test = 2;
14  
15 6 ▶sub ok() {
Subroutine ok: called CC=1 SCAR=0.0
16 6 print 'ok ',$test++,"\n";
17 }
18  
19 1 my $ud = undef;
20 1 my @bugtest = (
21 0 => '0.0.0.0/32', '0:0:0:0:0:0:0:0/128',
22 $ud => '0.0.0.0/0', '0:0:0:0:0:0:0:0/0',
23 "" => 'undef', 'undef',
24 );
25
26  
27 1 ▶for (my $i=0;$i <= $#bugtest;$i+=3) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#bugtest) 3 1 4
28 3 ▶ my $ip6 = sprintf("%s", NetAddr::IP::Lite->new6($bugtest[$i]) || 'undef');
Condition100%2/2
'NetAddr::IP::Lite'->new6($bugtest[$i]) || 'undef'
l!l
21
MC/DC100%1/1
'NetAddr::IP::Lite'->new6($bugtest[$i]) || 'undef'
'NetAddr::IP::Lite'->new6($bugtest[$i])
Truth table100%2/2
A
A= 'NetAddr::IP::Lite'->new6($bugtest[$i])
Aresult
11
00
29 3 ▶ my $ip = sprintf ("%s", NetAddr::IP::Lite->new($bugtest[$i]) || 'undef');
Condition100%2/2
'NetAddr::IP::Lite'->new($bugtest[$i]) || 'undef'
l!l
21
MC/DC100%1/1
'NetAddr::IP::Lite'->new($bugtest[$i]) || 'undef'
'NetAddr::IP::Lite'->new($bugtest[$i])
Truth table100%2/2
A
A= 'NetAddr::IP::Lite'->new($bugtest[$i])
Aresult
11
00
30 3 my $expip = $bugtest[$i+1];
31 3 my $expip6 = $bugtest[$i+2];
32  
33 3 ▶ print "got: $ip\nexp: $expip\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $ip eq $expip 0 3 3
34 unless $ip eq $expip;
35 3 &ok;
36  
37 3 ▶ print "got: $ip6\nexp: $expip6\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $ip6 eq $expip6 0 3 3
38 unless $ip6 eq $expip6;
39 3 &ok;
40  
41 }
« Lite/Util/t/addconst.t ↑ Summary Lite/Util/t/bcd2bin.t »