| 1 | |||||||||||||
| 2 | 1 | ▶ | BEGIN { $| = 1; print "1..7\n"; } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 1 | ▶ | END {print "not ok 1\n" unless $loaded;} | ||||||||||
|
Subroutine
END: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||
| 4 | |||||||||||||
| 5 | 1 | $loaded = 1; | |||||||||||
| 6 | 1 | print "ok 1\n"; | |||||||||||
| 7 | |||||||||||||
| 8 | #use diagnostics; | ||||||||||||
| 9 | 1 | ▶ | use NetAddr::IP::Lite; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 1 | $| = 1; | |||||||||||
| 12 | |||||||||||||
| 13 | 1 | my $test = 2; | |||||||||||
| 14 | |||||||||||||
| 15 | 6 | ▶ | sub ok() { | ||||||||||
|
Subroutine
ok: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 6 | print 'ok ',$test++,"\n"; | |||||||||||
| 17 | } | ||||||||||||
| 18 | |||||||||||||
| 19 | 1 | my $ud = undef; | |||||||||||
| 20 | 1 | my @bugtest = ( | |||||||||||
| 21 | 0 => '0.0.0.0/32', '0:0:0:0:0:0:0:0/128', | ||||||||||||
| 22 | $ud => '0.0.0.0/0', '0:0:0:0:0:0:0:0/0', | ||||||||||||
| 23 | "" => 'undef', 'undef', | ||||||||||||
| 24 | ); | ||||||||||||
| 25 | |||||||||||||
| 26 | |||||||||||||
| 27 | 1 | ▶ | for (my $i=0;$i <= $#bugtest;$i+=3) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 28 | 3 | ▶ | my $ip6 = sprintf("%s", NetAddr::IP::Lite->new6($bugtest[$i]) || 'undef'); | ||||||||||
|
Condition100%2/2
'NetAddr::IP::Lite'->new6($bugtest[$i]) || 'undef'
MC/DC100%1/1
'NetAddr::IP::Lite'->new6($bugtest[$i]) || 'undef'
'NetAddr::IP::Lite'->new6($bugtest[$i])
Truth table100%2/2
A
A= 'NetAddr::IP::Lite'->new6($bugtest[$i])
| |||||||||||||
| 29 | 3 | ▶ | my $ip = sprintf ("%s", NetAddr::IP::Lite->new($bugtest[$i]) || 'undef'); | ||||||||||
|
Condition100%2/2
'NetAddr::IP::Lite'->new($bugtest[$i]) || 'undef'
MC/DC100%1/1
'NetAddr::IP::Lite'->new($bugtest[$i]) || 'undef'
'NetAddr::IP::Lite'->new($bugtest[$i])
Truth table100%2/2
A
A= 'NetAddr::IP::Lite'->new($bugtest[$i])
| |||||||||||||
| 30 | 3 | my $expip = $bugtest[$i+1]; | |||||||||||
| 31 | 3 | my $expip6 = $bugtest[$i+2]; | |||||||||||
| 32 | |||||||||||||
| 33 | 3 | ▶ | print "got: $ip\nexp: $expip\nnot " | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 34 | unless $ip eq $expip; | ||||||||||||
| 35 | 3 | &ok; | |||||||||||
| 36 | |||||||||||||
| 37 | 3 | ▶ | print "got: $ip6\nexp: $expip6\nnot " | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 38 | unless $ip6 eq $expip6; | ||||||||||||
| 39 | 3 | &ok; | |||||||||||
| 40 | |||||||||||||
| 41 | } | ||||||||||||