Lite/t/v4-cnew.t

filter: Statementstmt 93.7% 15 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 90.0% 18 / 20 CC 1 SCAR 0.0
CC
1
Cov
89%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Lite/t/v4-basem.t ↑ Summary Lite/t/v6-cnew-uri.t »
1 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 1 my @subnets = (
4 [ '127.1', '127.0.0.1/32' ],
5 [ '127.1/16', '127.1.0.0/16' ],
6 [ '10.10.10', '10.10.0.10/32' ],
7 [ '10.10.10/24', '10.10.10.0/24' ],
8 # include test for cisco syntax using space instead of '/'
9 [ '127.1 16', '127.1.0.0/16' ],
10 [ '10.10.10 24', '10.10.10.0/24' ],
11 [ '10.10.10 255.255.255.0', '10.10.10.0/24' ],
12 );
13  
14 1 $| = 1;
15  
16 1 print '1..', (scalar @subnets) , "\n";
17  
18 1 my $count = 1;
19  
20 1 for my $n (@subnets) {
21 7 my $ip = new NetAddr::IP::Lite $n->[0];
22 7 ▶ if ($ip eq $n->[1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ip eq $n->[1]) { } 7 0 7
23 7 print "ok $count\n";
24 }
25 else {
26 0 print "not ok $count\n";
27 }
28  
29 7 ++ $count;
30 }
« Lite/t/v4-basem.t ↑ Summary Lite/t/v6-cnew-uri.t »