Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test pushing non-Str-keyed things onto a Hash.
  • Loading branch information
colomon committed Aug 13, 2012
1 parent 9e3bbb6 commit 915e4be
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S32-hash/push.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 5;
plan 7;

# L<S32::Containers/Hash/"Like hash assignment insofar">

Expand All @@ -24,6 +24,14 @@ my %ref2 = (a => [1, 4, 5], b => 2, c => 3);
is_deeply %g, %ref1, 'basic Hash.push with pairs ';
%g.push: 'a', 4, 'a', 5;
is_deeply %g, %ref2, 'stacking push worsk with alternating items';

my %hh;
%hh.push: 5, 'bar';
is_deeply %hh, { 5 => 'bar' }, 'Hash.push works pushing a non-Str-keyed alternating items';

my %gg;
%gg.push: 5 => 'bar';
is_deeply %gg, { 5 => 'bar' }, 'Hash.push works pushing a non-Str-keyed Pair';
}

# vim: ft=perl6

0 comments on commit 915e4be

Please sign in to comment.