Lite/t/range.t

filter: Statementstmt 100% 23 / 23 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 93.5% 29 / 31 CC 1 SCAR 0.0
CC
1
Cov
93%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Lite/t/aton.t ↑ Summary Lite/t/ipv4FFFF.t »
1  
2 #use diagnostics;
3 1 ▶use NetAddr::IP::Util qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
4 inet_ntoa
5 ipv6_n2x
6 1 );
7 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 $| = 1;
10  
11 1 print "1..2\n";
12  
13 1 my $test = 1;
14 2 ▶sub ok() {
Subroutine ok: called CC=1 SCAR=0.0
15 2 print 'ok ',$test++,"\n";
16 }
17  
18 1 my $loip = new NetAddr::IP::Lite('1.2.3.4/24');
19 1 my $hiip = new NetAddr::IP::Lite('FF00::4/120');
20  
21 ## test range
22  
23 1 my $exp = 'FF00:0:0:0:0:0:0:0 - FF00:0:0:0:0:0:0:FF';
24 1 my $txt = $hiip->range;
25 1 ▶print "got: $txt, exp: $exp\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $txt eq $exp 0 1 1
26 unless $txt eq $exp;
27 1 &ok;
28  
29 1 $exp = '1.2.3.0 - 1.2.3.255';
30 1 $txt = $loip->range;
31 1 ▶print "got: $txt, exp: $exp\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $txt eq $exp 0 1 1
32 unless $txt eq $exp;
33 1 &ok;
34  
« Lite/t/aton.t ↑ Summary Lite/t/ipv4FFFF.t »