Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove spec-invalid min/max Range tests
RT #105118
  • Loading branch information
coke committed Apr 5, 2013
1 parent 33955a8 commit f73dd38
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions S32-list/minmax.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 59;
plan 55;

# L<S32::Containers/List/=item min>
# L<S32::Containers/List/=item max>
Expand Down Expand Up @@ -39,14 +39,6 @@ is (@array.min: { abs $^a }), 0,
is min(:by({ $^a.abs }), @array), 0,
"subroutine form of min taking a comparison block works";

#?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,
"method form of min on Ranges taking a comparison block works";

is ((1..10).min: { ($_-3) * ($_-5) }), 4,
"method form of min taking an arity-1 comparison block works";

# Tests for C<max>:
is (@array.max), 7, "basic method form of max works";
is max(:by({ $^a <=> $^b }), @array), 7, "basic subroutine form of max works";
Expand All @@ -56,11 +48,6 @@ is (@array.max: { $^a <=> $^b }), 7,

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,
"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";

Expand All @@ -73,11 +60,6 @@ is (@array.max: { $^a.abs }), -9,
is max(:by({ $^a.abs }), @array), -9,
"subroutine form of max taking a modifier block works";

#?rakudo skip "Range.max not fully implemented yet (RT #105118)"
#?niecza skip "Range.min not fully implemented yet"
is ((1..10).max: { ($_-3) * ($_-5) }), 10,
"method form of max taking an arity-1 comparison block works";

# Tests for C<minmax>:
is @array.minmax, -9..7, "basic method form of minmax works";
is minmax(@array), -9..7, 'minmax(list)';
Expand Down

0 comments on commit f73dd38

Please sign in to comment.