Lite/t/new-num.t

filter: Statementstmt 100% 16 / 16 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 95.6% 22 / 23 CC 1 SCAR 0.0
CC
1
Cov
95%
BEGIN
1.0
BEGIN
1.0
ok
1.0
CRAP 1.0
« Lite/t/ipv4FFFF.t ↑ Summary Lite/t/old-num.t »
1  
2 #use diagnostics;
3 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 $| = 1;
6  
7 8 ▶sub ok() {
Subroutine ok: called CC=1 SCAR=0.0
8 8 print 'ok ',$test++,"\n";
9 }
10  
11 1 my @try = qw(
12 10/32 1
13 10/31 2
14 10/30 2
15 ::1/128 1
16 ::1/127 2
17 ::1/126 2
18 1.2.3.11/29 6
19 FF::8B/125 6
20 );
21  
22 1 print '1..',(@try/2),"\n";
23  
24 1 $test = 1;
25  
26 1 ▶foreach(my $i = 0;$i <=$#try;$i+= 2) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#try) 8 1 9
27 8 my $ip = NetAddr::IP::Lite->new($try[$i]);
28 8 my $exp = $try[$i +1];
29  
30 8 ▶ print "got: $_, exp: $exp\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless ($_ = $ip->num) == $exp 0 8 8
31 unless ($_ = $ip->num) == $exp;
32 8 &ok;
33 }
« Lite/t/ipv4FFFF.t ↑ Summary Lite/t/old-num.t »