Skip to content

Commit dc03e10

Browse files
committed
Tests for my @A of int, which now works.
1 parent 7e9a101 commit dc03e10

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

S09-typed-arrays/native-decl.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
use Test;
22

3-
plan 8;
3+
plan 10;
44

55
{
66
my int @is;
77
ok @is ~~ array[int], 'my int @x gives a native int array';
88
}
99

10+
{
11+
my @is of int;
12+
ok @is ~~ array[int], 'my @x of int gives a native int array';
13+
}
14+
1015
{
1116
my int @is = 1..10;
1217
is @is.elems, 10, 'Can initialize an int array at declaration (1)';
@@ -19,6 +24,11 @@ plan 8;
1924
ok @ns ~~ array[num], 'my int @x gives a native num array';
2025
}
2126

27+
{
28+
my @ns of num;
29+
ok @ns ~~ array[num], 'my @x of num gives a native num array';
30+
}
31+
2232
{
2333
my num @ns = 1e0..10e0;
2434
is @ns.elems, 10, 'Can initialize a num array at declaration (1)';

0 commit comments

Comments
 (0)