Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[push.t] Hash.push should return a Hash
  • Loading branch information
perlpilot committed Jan 12, 2011
1 parent 3a387fe commit 77ad197
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion S32-hash/push.t
@@ -1,13 +1,18 @@
use v6;
use Test;
plan 4;
plan 5;

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

my %ref1 = (a => 1, b => 2, c => 3);
my %ref2 = (a => [1, 4, 5], b => 2, c => 3);

{

my ($r, %x);
$r = %x.push: 'a' => 1;
is $r.WHAT, Hash, 'Hash.push returns hash';

my %h;
%h.push: 'b', 2, 'a', 1, 'c', 3;
is_deeply %h, %ref1, 'basic Hash.push with alternating items';
Expand Down

0 comments on commit 77ad197

Please sign in to comment.