Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 37 lines (25 sloc) 0.839 kb
d007a44 [t] move multidimensional_arglists.t to spec/, and correct it according ...
moritz authored
1 use v6;
2
3 use Test;
4
f705499 [multidimensional.t] typo in plan
lwall authored
5 plan 7;
d007a44 [t] move multidimensional_arglists.t to spec/, and correct it according ...
moritz authored
6
7 # L<S06/"Multidimensional argument list binding">
8
636db57 [t/spec] fix all occurrences of @@ one way or another
lwall authored
9 sub get_multidim_arglist (**@AoA) { @AoA }
d007a44 [t] move multidimensional_arglists.t to spec/, and correct it according ...
moritz authored
10
11 {
12 my @array1 = <a b c>;
13 my @array2 = <d e f>;
14
636db57 [t/spec] fix all occurrences of @@ one way or another
lwall authored
15 my @AoA = get_multidim_arglist(@array1; @array2);
16 is +@AoA, 2, "basic multidim arglist binding (1)";
17 is ~@AoA[0], "a b c", "basic multidim arglist binding (2)";
18 is ~@AoA[1], "d e f", "basic multidim arglist binding (3)";
d007a44 [t] move multidimensional_arglists.t to spec/, and correct it according ...
moritz authored
19 }
20
21 {
22 my @array1 = <a b c>;
23
636db57 [t/spec] fix all occurrences of @@ one way or another
lwall authored
24 my @AoA = get_multidim_arglist(@array1);
25 is +@AoA, 1, "multidim arglist binding with only one array (1)";
26 is ~@AoA[0], "a b c", "multidim arglist binding with only one array (2)";
d007a44 [t] move multidimensional_arglists.t to spec/, and correct it according ...
moritz authored
27 }
28
29 {
30 # XXX is this correct?
31 dies_ok { get_multidim_arglist(1,2,3) },
32 "three scalars are not compatible with a sub expecting a multidim arglist";
33 }
34
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
35
36 # vim: ft=perl6
Something went wrong with that request. Please try again.