Skip to content

Commit

Permalink
Adding test to dynamic shaped array and dynamic object hash
Browse files Browse the repository at this point in the history
  • Loading branch information
FCO committed Nov 27, 2018
1 parent 5b9bfe3 commit 50632a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion S02-types/array-shapes.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 39;
plan 40;

# L<S09/Fixed-size arrays>

Expand Down Expand Up @@ -168,3 +168,7 @@ subtest '.Array on uninited shaped array' => {
my @matrix[2;2]; @matrix['0'; '0'] = 42;
is-deeply @matrix[0;0], 42, 'Str can be used to index shaped arrays';
}

{
eval-lives-ok 'my @*a[3]', "Accept dynamic shaped arrays"
}
6 changes: 5 additions & 1 deletion S09-hashes/objecthash.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 54;
plan 55;

{
class A { method Str() { 'foo' } };
Expand Down Expand Up @@ -136,4 +136,8 @@ plan 54;
is-deeply %a{1;1..3}:exists, (False, True, False);
}

{
eval-lives-ok 'my %*a{Int}', "Accept dynamic object hash"
}

#vim: ft=perl6

0 comments on commit 50632a8

Please sign in to comment.