Lite/t/aton.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/version.t ↑ Summary Lite/t/range.t »
1  
2 #use diagnostics;
3 1 ▶use NetAddr::IP::Util qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
4 inet_n2dx
5 1 );
6 1 ▶use NetAddr::IP::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 $| = 1;
9  
10 1 print "1..2\n";
11  
12 1 my $test = 1;
13 2 ▶sub ok() {
Subroutine ok: called CC=1 SCAR=0.0
14 2 print 'ok ',$test++,"\n";
15 }
16  
17 1 my $loip = new NetAddr::IP::Lite('::1.2.3.4/120'); # same as 1.2.3.4/24
18 1 my $hiip = new NetAddr::IP::Lite('FF00::4/120');
19  
20 ## test aton
21  
22 1 my $exp = 'FF00:0:0:0:0:0:0:4';
23 1 my $txt = inet_n2dx($hiip->aton);
24 1 ▶print "got: $txt, exp: $exp\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $txt eq $exp 0 1 1
25 unless $txt eq $exp;
26 1 &ok;
27  
28 1 $exp = '1.2.3.4';
29 1 $txt = inet_n2dx($loip->aton);
30 1 ▶print "got: $txt, exp: $exp\nnot "
Branch: 1 branch
BranchTrueFalseTotal
unless $txt eq $exp 0 1 1
31 unless $txt eq $exp;
32 1 &ok;
33  
« Lite/t/version.t ↑ Summary Lite/t/range.t »