Lite/t/v4-cidr.t

filter: Statementstmt 87.5% 14 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 85.0% 17 / 20 CC 1 SCAR 0.0
CC
1
Cov
83%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Lite/t/nofqdn.t ↑ Summary Lite/t/over_comp.t »
1 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 1 $| = 1;
4  
5 1 my @addr = (qw(
6 0.0.0.0/0
7 1.0.0.0/1
8 2.0.0.0/2
9 10.0.0.0/8
10 10.0.120.0/24
11 161.196.66.0/25
12 255.255.255.255/32
13 ));
14  
15 1 print '1..', scalar @addr, "\n";
16  
17 1 my $count = 1;
18  
19 1 for my $a (@addr) {
20 7 my $ip = new NetAddr::IP::Lite $a;
21 7 ▶ if ($ip->cidr eq $a) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ip->cidr eq $a) { } 7 0 7
22 7 print "ok ", $count ++, "\n";
23 }
24 else {
25 0 print "not ok ", $count ++, "\n";
26 0 print "$a -> ", $ip->cidr, " [", $ip->mask, "]\n";
27 }
28 }
« Lite/t/nofqdn.t ↑ Summary Lite/t/over_comp.t »