Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/perl6/roast
  • Loading branch information
Coleoid committed Jul 20, 2012
2 parents 726f78c + 39f2806 commit 25c7944
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion S06-multi/proto.t
Expand Up @@ -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";
}
Expand Down
2 changes: 1 addition & 1 deletion S06-routine-modifiers/lvalue-subroutines.t
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions S32-list/minmax.t
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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";
Expand All @@ -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,
Expand Down

0 comments on commit 25c7944

Please sign in to comment.