Permalink
Browse files

Merge branch 'master' of https://github.com/perl6/roast

  • Loading branch information...
2 parents 726f78c + 39f2806 commit 25c794442cb865f2fc79e8b5fe64c80e2a4703b6 Coleoid committed Jul 20, 2012
Showing with 11 additions and 11 deletions.
  1. +1 −1 S06-multi/proto.t
  2. +1 −1 S06-routine-modifiers/lvalue-subroutines.t
  3. +9 −9 S32-list/minmax.t
View
@@ -51,7 +51,7 @@ is(foo(42), 1, 'dispatch with no possible candidates fell back to proto');
#?niecza skip '>>>Stub code executed'
{
- proto prefix:<elk> ($arg) {...}
+ proto prefix:<elk> ($arg) { * }
multi prefix:<elk> ($arg) { $arg + 1 }
is (elk 3), 4, "multi definition of prefix:<elk> works";
}
@@ -78,7 +78,7 @@ sub checklastval ($passwd) is rw {
);
};
-my $errors;
+#?rakudo skip 'segfaults, probably due to [RT #114134]'
dies_ok {checklastval("octopus") = 10 }, 'checklastval STORE can die';
# Above test may well die for the wrong reason, if the Proxy stuff didn't
View
@@ -29,9 +29,9 @@ is (@array.min:{ $^a <=> $^b }), -9,
is min(:by({ $^a <=> $^b }), @array), -9,
"subroutine form of min with identity comparison block works";
-is (@array.min: { abs $^a <=> abs $^b }), 0,
+is (@array.min: { abs($^a) <=> abs($^b) }), 0,
"method form of min taking a comparison block works";
-is min(:by({ abs $^a <=> abs $^b }), @array), 0,
+is min(:by({ abs($^a) <=> abs($^b) }), @array), 0,
"subroutine form of min taking a comparison block works";
is (@array.min: { abs $^a }), 0,
@@ -41,7 +41,7 @@ is min(:by({ $^a.abs }), @array), 0,
#?rakudo 2 skip "Range.min not fully implemented yet (RT #105118)"
#?niecza 2 skip "Range.min not fully implemented yet"
-is ((-10..10).min: { abs $^a <=> abs $^b }), 0,
+is ((-10..10).min: { abs($^a) <=> abs($^b) }), 0,
"method form of min on Ranges taking a comparison block works";
is ((1..10).min: { ($_-3) * ($_-5) }), 4,
@@ -58,15 +58,15 @@ is max(@array), 7, 'sub form of max';
#?rakudo skip "Range.max not fully implemented yet (RT #105118)"
#?niecza 2 skip "Range.max not fully implemented yet"
-is ((-10..9).max: { abs $^a <=> abs $^b }), -10,
+is ((-10..9).max: { abs($^a) <=> abs $^b }), -10,
"method form of max on Ranges taking a comparison block works";
is max(:by({ $^a <=> $^b }), @array), 7,
"subroutine form of max with identity comparison block works";
-is (@array.max: { abs $^a <=> abs $^b }), -9,
+is (@array.max: { $^a.abs <=> $^b.abs }), -9,
"method form of max taking a comparison block works";
-is max(:by({ abs $^a <=> abs $^b }), @array), -9,
+is max(:by({ $^a.abs <=> $^b.abs }), @array), -9,
"subroutine form of max taking a comparison block works";
is (@array.max: { $^a.abs }), -9,
"method form of max taking a modifier block works";
@@ -88,16 +88,16 @@ is (@array.minmax: { $^a <=> $^b }), -9..7,
is minmax(:by({ $^a <=> $^b }), @array), -9..7,
"subroutine form of minmax with identity comparison block works";
-is (@array.minmax: { abs $^a <=> abs $^b }), 0..-9,
+is (@array.minmax: { $^a.abs <=> $^b.abs }), 0..-9,
"method form of minmax taking a comparison block works";
-is minmax(:by({ abs $^a <=> abs $^b }), @array), 0..-9,
+is minmax(:by({ $^a.abs <=> $^b.abs }), @array), 0..-9,
"subroutine form of minmax taking a comparison block works";
is (@array.minmax: { abs $^a }), 0..-9,
"method form of minmax taking a comparison block works";
is minmax(:by({ $^a.abs }), @array), 0..-9,
"subroutine form of minmax taking a comparison block works";
-is ((-10..9).minmax: { abs $^a <=> abs $^b }), 0..-10,
+is ((-10..9).minmax: { $^a.abs <=> $^b.abs }), 0..-10,
"method form of minmax on Ranges taking a comparison block works";
is ((1..10).minmax: { ($_-3) * ($_-5) }), 4..10,

0 comments on commit 25c7944

Please sign in to comment.