Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
refudge hash_ref.t for rakudo
  • Loading branch information
moritz committed Jul 5, 2011
1 parent 347de93 commit b24a341
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions S02-builtin_data_types/hash_ref.t
Expand Up @@ -25,15 +25,13 @@ plan 32;
# basic hash creation w/ comma separated key/values
{
my $hash = hash("1st", 1);
#?rakudo todo 'isa Hash'
isa_ok $hash, Hash;
is $hash{"1st"}, 1, 'comma separated key/value hash creation works';
is $hash<1st>, 1, 'unquoted <key> fetching works';
}

{
my $hash = hash("1st", 1, "2nd", 2);
#?rakudo todo 'isa Hash'
isa_ok $hash, Hash;
is $hash{"1st"}, 1,
'comma separated key/value hash creation works with more than 1st pair';
Expand All @@ -44,7 +42,6 @@ plan 32;
# hash slicing
{
my $hash = {'1st' => 1, '2nd' => 2, '3rd' => 3};
#?rakudo todo 'isa Hash'
isa_ok $hash, Hash;

my @slice1 = $hash{"1st", "3rd"};
Expand All @@ -70,7 +67,6 @@ plan 32;

# hashref assignment using {}
# L<S06/Anonymous hashes vs blocks/So you may use sub or hash or pair to disambiguate:>
#?rakudo todo 'isa Hash'
{
my $hash_a = { a => 1, b => 2 };
isa_ok $hash_a, "Hash";
Expand All @@ -80,6 +76,7 @@ plan 32;
isa_ok $hash_c, "Hash";
my $hash_d = hash 'a', 1, "b", 2;
isa_ok $hash_d, "Hash";
#?rakudo todo 'isa hash'
my $hash_e = { pair "a", 1, "b", 2 };
isa_ok $hash_e, "Hash";
}
Expand Down

0 comments on commit b24a341

Please sign in to comment.