File: Util.t

package info (click to toggle)
libmaxmind-db-writer-perl 0.300003-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,336 kB
  • sloc: ansic: 3,059; perl: 2,895; makefile: 5; sh: 4
file content (19 lines) | stat: -rw-r--r-- 378 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

use MaxMind::DB::Writer::Util qw( key_for_data );
use Test::More;

{    # Test that refcount does not affect the key. (It did previously.)
    my $array1 = [ 0, 0 ];
    my @array2 = ( 0, 0 );

    is(
        key_for_data($array1),
        key_for_data( \@array2 ),
        'two generations of structure generate same key'
    );

}

done_testing();