Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 51 lines (36 sloc) 1.365 kb
d007a445 »
2009-04-14 [t] move multidimensional_arglists.t to spec/, and correct it accordi…
1 use v6;
2
3 use Test;
4
956f9fc6 »
2013-06-19 do some multidim slurpy tests (fudged for rakudo)
5 plan 10;
d007a445 »
2009-04-14 [t] move multidimensional_arglists.t to spec/, and correct it accordi…
6
7 # L<S06/"Multidimensional argument list binding">
8
636db576 »
2010-02-03 [t/spec] fix all occurrences of @@ one way or another
9 sub get_multidim_arglist (**@AoA) { @AoA }
d007a445 »
2009-04-14 [t] move multidimensional_arglists.t to spec/, and correct it accordi…
10
11 {
12 my @array1 = <a b c>;
13 my @array2 = <d e f>;
14
636db576 »
2010-02-03 [t/spec] fix all occurrences of @@ one way or another
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)";
d007a445 »
2009-04-14 [t] move multidimensional_arglists.t to spec/, and correct it accordi…
19 }
20
21 {
22 my @array1 = <a b c>;
23
636db576 »
2010-02-03 [t/spec] fix all occurrences of @@ one way or another
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)";
d007a445 »
2009-04-14 [t] move multidimensional_arglists.t to spec/, and correct it accordi…
27 }
28
956f9fc6 »
2013-06-19 do some multidim slurpy tests (fudged for rakudo)
29 multi sub multi_get_multidim_arglist(**@AoA) { @AoA }
30 multi sub multi_get_multidim_arglist(Int $a) { $a }
31
32 {
33 my @a1 = <a b c>;
34 my @a2 = <d e f>;
35
36 my @AoA = multi_get_multidim_arglist(@a1; @a2);
37 is +@AoA, 2, "multi sub with multidim arglist binding (1)";
38 is @AoA[0], "a b c", "multi sub with multidim arglist binding (2)";
39 is @AoA[1], "d e f", "multi sub with multidim arglist binding (3)";
40 }
41
42 {
43 my @a1 = <a b c>;
44
45 my @AoA = multi_get_multidim_arglist(@a1);
46 is +@AoA, 1, "multi sub with multidim arglist binding for only one array (1)";
47 is @AoA[0], "a b c", "multi sub with multidim arglist binding for only one array (2)";
48 }
49
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
50 # vim: ft=perl6
Something went wrong with that request. Please try again.