File Coverage

t/constants.t
Criterion Covered Total %
statement n/a
branch n/a
condition n/a
subroutine n/a
pod n/a
total n/a


line stmt bran cond sub pod time code
1              
2             #use diagnostics;
3             use Test::More tests => 15;
4             use NetAddr::IP qw(Zeros Zero Ones V4mask V4net);
5              
6             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             my($ip,$rv);
15             foreach (sort keys %const) {
16             ok(($ip = new NetAddr::IP($_)),"netaddr $_");
17             ok($ip->{addr} eq $const{$_},"match $_");
18             ok(($rv = length($const{$_})) == 16, "length $_ is $rv");
19             }
20