Skip to content

Commit ca7012f

Browse files
committed
Make sure we don't depend on order of keys in Hash.perl (spotted in rakudo.jvm tests)
1 parent cd2d064 commit ca7012f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

S32-hash/perl.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plan 12;
88
# simple hash
99
{
1010
my %h = a => 1, b => 2;
11-
is %h.perl, '("a" => 1, "b" => 2).hash',
11+
is %h.perl,'("a" => 1, "b" => 2).hash'|'("b" => 2, "a" => 1).hash',
1212
'can we serialize a simple hash';
1313
my $rh = eval(%h.perl);
1414
is_deeply $rh, %h, 'can we roundtrip simple hash';
@@ -21,7 +21,7 @@ plan 12;
2121
# hash with constrained values
2222
{
2323
my Int %h = a => 1, b => 2;
24-
is %h.perl, 'Hash[Int].new("a" => 1, "b" => 2)',
24+
is %h.perl, 'Hash[Int].new("a" => 1, "b" => 2)'|'Hash[Int].new("b" => 2, "a" => 1)',
2525
'can we serialize a hash with constrained values';
2626
my $rh = eval(%h.perl);
2727
is_deeply $rh, %h, 'can we roundtrip hash constrained values';
@@ -34,7 +34,7 @@ plan 12;
3434
# hash with constrained keys & values
3535
{
3636
my Int %h{Str} = a => 1, b => 2;
37-
is %h.perl, 'Hash[Int,Str].new("a" => 1, "b" => 2)',
37+
is %h.perl, 'Hash[Int,Str].new("a" => 1, "b" => 2)'|'Hash[Int,Str].new("b" => 2, "a" => 1)',
3838
'can we serialize a hash with constrained keys & values';
3939
my $rh = eval(%h.perl);
4040
is_deeply $rh, %h, 'can we roundtrip hash constrained keys & values';

0 commit comments

Comments
 (0)