Lite/t/rfc_1918.t

filter: Statementstmt 100% 17 / 17 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 95.8% 23 / 24 CC 1 SCAR 0.0
CC
1
Cov
95%
BEGIN
1.0
BEGIN
1.0
ok
1.0
CRAP 1.0
« Lite/t/is_local.t ↑ Summary Lite/t/old-nth.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 1 print "1..12\n";
8  
9 1 my $test = 1;
10 12 ▶sub ok() {
Subroutine ok: called CC=1 SCAR=0.0
11 12 print 'ok ',$test++,"\n";
12 }
13  
14 1 my @ips = qw(
15 9.255.255.255 0
16 10.0.0.0 1
17 10.255.255.255 1
18 11.0.0.0 0
19 172.15.255.255 0
20 172.16.0.0 1
21 172.31.255.255 1
22 172.32.0.0 0
23 192.167.255.255 0
24 192.168.0.0 1
25 192.168.255.255 1
26 192.169.0.0 0
27 );
28  
29  
30 1 ▶for (my $i=0;$i<=$#ips;$i+=2) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#ips) 12 1 13
31 12 my $ip = new NetAddr::IP::Lite($ips[$i]);
32 12 my $got = $ip->is_rfc1918();
33 12 my $exp = $ips[$i+1];
34 12 ▶ print $ip," got: $got, exp: $exp\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $got == $exp 0 12 12
35 unless $got == $exp;
36 12 &ok;
37 }
38  
« Lite/t/is_local.t ↑ Summary Lite/t/old-nth.t »