]>
iEval git - tie-hash-sorted-xs.git/blob - t/Tie-Hash-Sorted-XS.t
46431fbd883c3c8b0fbf66d8d4205502ad27a382
5 use Test
::More tests
=> 5;
6 BEGIN { use_ok
('Tie::Hash::Sorted::XS') };
8 tie
my %hash, 'Tie::Hash::Sorted::XS';
14 my $keys = join ' ', keys %hash;
16 is
$keys, 'Anna Bob Jim', 'keys are ordered';
17 is
$hash{Bob
}, 3, 'retrieval works';
20 tie
my %refhash, 'Tie::Hash::Sorted::XS', Tree
::SizeBalanced
::any_int
->new(sub { $$a <=> $$b });
23 $refhash{\
$three} = 2;
25 $refhash{$tworef} = 3;
29 $values .= $refhash{$_} . ' ';
33 my @keys = keys %refhash;
34 is
ref($keys[0]), 'SCALAR', 'non-string keys work';
35 is
$values, '3 2 1', 'values of refhash'
This page took 0.054239 seconds and 5 git commands to generate.