Lite/t/pathological.t

filter: Statementstmt 100% 16 / 16 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 91.6% 22 / 24 CC 2 SCAR 3.8
CC
2
Cov
90%
END
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Lite/t/v4-aton.t ↑ Summary Lite/Util/t/hasbits.t »
1  
2 #use diagnostics;
3 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶END {print "1..1\nnot ok 1\n" unless $test};
Subroutine END: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
unless $test 0 1 1
6  
7 1 $| = 1;
8  
9 1 $test = 1;
10 3 ▶sub ok() {
Subroutine ok: called CC=1 SCAR=0.0
11 3 print 'ok ',$test++,"\n";
12 }
13  
14 1 my @addrs = # pathological cases should fail
15 qw( ::foo
16 ::f00/129
17 ::f00/150
18 );
19  
20 1 print '1..',(scalar @addrs),"\n";
21  
22 1 my $ip;
23 1 foreach(@addrs) {
24 3 ▶ print "expected undef, got: $ip\nnot "
Branch: 1 branch
BranchTrueFalseTotal
if $ip = "NetAddr::IP::Lite"->new($_) 0 3 3
25 if ($ip = new NetAddr::IP::Lite($_));
26 3 &ok;
27 }
« Lite/t/v4-aton.t ↑ Summary Lite/Util/t/hasbits.t »