Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update invert tests for glr
  • Loading branch information
perlpilot committed Aug 20, 2015
1 parent f70ab58 commit a7f470c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions S32-hash/invert.t
Expand Up @@ -7,17 +7,17 @@ plan 5;

{
my %h = a => 'b', c => 'd';
isa-ok %h.invert, List, 'Hash.invert returns a List';
isa-ok %h.invert, Seq, 'Hash.invert returns a Seq';
#?niecza todo 'Cannot use value like Pair as a number'
is-deeply %h.invert.sort, (b => 'a', d => 'c'), 'simple Hash.invert works';
is-deeply %h.invert.sort.list, (b => 'a', d => 'c'), 'simple Hash.invert works';
is-deeply %h, { a => 'b', c => 'd' }, 'original remains unchanged';
}

{
# with lists
my %h = a => <b c>, d => 'e';
#?niecza todo 'Cannot use value like Pair as a number'
is-deeply %h.invert.sort, (b => 'a', c => 'a', e => 'd'),
is-deeply %h.invert.sort.list, (b => 'a', c => 'a', e => 'd'),
'Hash.invert flattens list values';
is-deeply %h, {a => <b c>, d => 'e'}, 'original remains unchanged';
}
Expand Down

0 comments on commit a7f470c

Please sign in to comment.