Lite/t/constants.t

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 18 / 18 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Lite/t/v4-badnm.t ↑ Summary Lite/t/lower.t »
1  
2 #use diagnostics;
3 1 ▶use Test::More tests => 15;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use NetAddr::IP::Lite qw(Zeros Zero Ones V4mask V4net);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 my %const = (
7 '0::' => Zeros,
8 '::' => Zero,
9 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF' => Ones,
10 'FFFF:FFFF:FFFF:FFFF:FFFF:FFFF::' => V4mask,
11 '::FFFF:FFFF' => V4net,
12 );
13  
14 1 my($ip,$rv);
15 1 foreach (sort keys %const) {
16 5 ok(($ip = new NetAddr::IP::Lite($_)),"netaddr $_");
17 5 ok($ip->{addr} eq $const{$_},"match $_");
18 5 ok(($rv = length($const{$_})) == 16, "length $_ is $rv");
19 }
« Lite/t/v4-badnm.t ↑ Summary Lite/t/lower.t »