Permalink
Browse files

[t/spec] fix all occurrences of @@ one way or another

git-svn-id: http://svn.pugscode.org/pugs@29634 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent e44ee68 commit 636db576538c72622982114870779855a7d0a587 lwall committed Feb 3, 2010
View
@@ -77,7 +77,6 @@ plan 30;
eval_dies_ok('$', 'Anonymous variable outside of declaration');
eval_dies_ok('@', 'Anonymous variable outside of declaration');
-eval_dies_ok('@@', 'Anonymous variable outside of declaration');
eval_dies_ok('%', 'Anonymous variable outside of declaration');
eval_dies_ok('&', 'Anonymous variable outside of declaration');
@@ -25,9 +25,8 @@ ok eval('<a b> X <c d>'), 'cross non-meta operator parses';
}
# L<S03/List infix precedence/and a list of arrays in>
-#?rakudo skip 'parsefail: @@( ... )'
{
- my @result = gather for @@(1..3 X 'A'..'B') -> $na {
+ my @result = gather for (1..3 X 'A'..'B').slice -> $na {
take $na.join(':');
}
is @result, <1:A 1:B 2:A 2:B 3:A 3:B>, 'chunky cross operator works';
View
@@ -90,7 +90,7 @@ plan 23;
is(@data, <2 4 6 8 10>, 'final result was unaffected by the tap variable');
}
-# no need for temp variables in feeds: $(*), @(*), @@(*), %(*)
+# no need for temp variables in feeds: $(*), @(*), %(*)
{
my @data = 'a' .. 'z';
my @out = <a e i o u y>;
@@ -100,7 +100,7 @@ plan 23;
@data ==> grep {/<[aeiouy]>/} ==> is(%(*), %(@out), 'basic test for %(*)');
# XXX: currently the same as the @(*) test above. Needs to be improved
- @data ==> grep {/<[aeiouy]>/} ==> is(@@(*), @@(@out), 'basic test for @@(*)');
+ @data ==> grep {/<[aeiouy]>/} ==> is(@(*).slice, @(@out).slice, 'basic test for @(*).slice');
}
# <<== and ==>> pretending to be unshift and push, respectively
@@ -130,8 +130,8 @@ plan 23;
# stacked feeds
{
- ('a' .. 'd'; 0 .. 3) ==> my @@data;
- is(@(@@data), <a b c d 0 1 2 3>, 'two stacked feeds');
+ ('a' .. 'd'; 0 .. 3) ==> my @data;
+ is(@(@data), <a b c d 0 1 2 3>, 'two stacked feeds');
}
# vim: ft=perl6
View
@@ -55,11 +55,11 @@ for (1..6) -> $N {
# more interesting variations of :nth(...)
{
ok($data ~~ m:nth(2,3)/(fo+)/, 'nth(list) is ok');
- is(@@(), <foo fooo>, 'nth(list) matched correctly');
+ is(@(), <foo fooo>, 'nth(list) matched correctly');
ok($data ~~ m:nth(2|4)/(fo+)/, 'nth(junction) is ok');
- is(@@(), <foo foooo>, 'nth(junction) matched correctly');
+ is(@(), <foo foooo>, 'nth(junction) matched correctly');
ok($data ~~ m:nth({$_ == 3 || $_ == 4})/(fo+)/, 'nth({code}) is ok');
- is(@@(), <fooo foooo>, 'nth({code} matched correctly');
+ is(@(), <fooo foooo>, 'nth({code} matched correctly');
}
@@ -6,24 +6,24 @@ plan 7;
# L<S06/"Multidimensional argument list binding">
-sub get_multidim_arglist (*@@AoA) { @@AoA }
+sub get_multidim_arglist (**@AoA) { @AoA }
{
my @array1 = <a b c>;
my @array2 = <d e f>;
- my @@AoA = get_multidim_arglist(@array1; @array2);
- is +@@AoA, 2, "basic multidim arglist binding (1)";
- is ~@@AoA[0], "a b c", "basic multidim arglist binding (2)";
- is ~@@AoA[1], "d e f", "basic multidim arglist binding (3)";
+ my @AoA = get_multidim_arglist(@array1; @array2);
+ is +@AoA, 2, "basic multidim arglist binding (1)";
+ is ~@AoA[0], "a b c", "basic multidim arglist binding (2)";
+ is ~@AoA[1], "d e f", "basic multidim arglist binding (3)";
}
{
my @array1 = <a b c>;
- my @@AoA = get_multidim_arglist(@array1);
- is +@@AoA, 1, "multidim arglist binding with only one array (1)";
- is ~@@AoA[0], "a b c", "multidim arglist binding with only one array (2)";
+ my @AoA = get_multidim_arglist(@array1);
+ is +@AoA, 1, "multidim arglist binding with only one array (1)";
+ is ~@AoA[0], "a b c", "multidim arglist binding with only one array (2)";
}
{
@@ -3,7 +3,7 @@ use Test;
plan 16;
-# L<S13/"Type Casting"/"method postcircumfix:<{ }> (*@@slice) {...}">
+# L<S13/"Type Casting"/"method postcircumfix:<{ }> (**@slice) {...}">
# basic tests to see if the methods overload correctly.
#?rakudo skip "rakudo still implements it without an inner capture"
@@ -3,14 +3,14 @@ use Test;
plan 14;
-# L<S13/"Type Casting"/"method %.{ *@@slice } {...}">
+# L<S13/"Type Casting"/"method %.{ **@slice } {...}">
# basic tests to see if the methods overload correctly.
{
class TypeCastMixed {
method &.( |$capture ) {return 'pretending to be a sub'}
- method postcircumfix:<[ ]> (*@@slice) {return 'pretending to be an array'}
- method %.{ *@@slice } {return 'pretending to be a hash'}
+ method postcircumfix:<[ ]> (**@slice) {return 'pretending to be an array'}
+ method %.{ **@slice } {return 'pretending to be a hash'}
}
my $thing = TypeCastMixed.new;
@@ -3,7 +3,7 @@ use Test;
plan 14;
-# L<S13/"Type Casting"/"method %.{ *@@slice } {...}">
+# L<S13/"Type Casting"/"method %.{ **@slice } {...}">
# basic tests to see if the methods overload correctly.
{
@@ -18,7 +18,7 @@ plan 14;
{
class TypeCastArray {
- method @.[ *@@slice ] {return 'pretending to be an array'}
+ method @.[ **@slice ] {return 'pretending to be an array'}
}
my $thing = TypeCastArray.new;
@@ -30,7 +30,7 @@ plan 14;
{
class TypeCastHash {
- method %.{ *@@slice } {return 'pretending to be a hash'}
+ method %.{ **@slice } {return 'pretending to be a hash'}
}
my $thing = TypeCastHash.new;
View
@@ -10,7 +10,7 @@ plan 6;
Tests of
- our Lazy multi Container::cat( *@@list );
+ our Lazy multi Container::cat( **@list );
=end pod
@@ -11,7 +11,7 @@ plan 8;
Tests of
our Lazy multi Container::roundrobin( Bool :$shortest,
- Bool :$finite, *@@list );
+ Bool :$finite, **@list );
=end pod

0 comments on commit 636db57

Please sign in to comment.