Debian Codegraph @

t/MaxMind/DB/Metadata.t

raw
1 use strict;
2 use warnings;
3
4 use Test::More;
5
6 use Math::BigInt ();
7 use MaxMind::DB::Metadata;
8
9 my %args = (
10 binary_format_major_version => 1,
11 binary_format_minor_version => 1,
12 build_epoch => time(),
13 database_type => 'Test',
14 description => { foo => 'bar' },
15 ip_version => 4,
16 node_count => 100,
17 record_size => 32,
18 );
19
20 {
21 my $metadata = MaxMind::DB::Metadata->new(%args);
22
23 ok( $metadata, 'code compiles' );
24 }
25
26 {
27 my $metadata = MaxMind::DB::Metadata->new(
28 %args,
29 binary_format_major_version => Math::BigInt->bone,
30 );
31
32 ok( $metadata, 'Math::BigInt works as Int in Metadata' );
33 }
34
35 done_testing();