Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test minmax on ranges
  • Loading branch information
TimToady committed Mar 12, 2015
1 parent 29d4133 commit b507033
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S03-operators/minmax.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 25;
plan 29;

# L<S03/Tight or precedence/Minimum and maximum>
# L<S03/Tight or precedence/"any value of any type may be compared with +Inf
Expand Down Expand Up @@ -58,6 +58,13 @@ This test min/max functions in their operator form. To see them tested in their
is (@a minmax @b).perl, ("Barleycorn!".."us").perl, 'minmax works for strings, too';
}

{
is((1..2 minmax 8..9), 1..9, "minmax works on two disjoint ranges");
is((1..6 minmax 4..9), 1..9, "minmax works on two overlapping ranges");
is((1..8 minmax 4..5), 1..8, 'minmax works when both are on left list');
is((4..5 minmax 1..8), 1..8, 'minmax works when both are on right list');
}

#array vs. scalar
#?rakudo skip "Annoying test that we haven't done the obvious yet unspecced, fails because we have indeed done the obvious"
#?niecza todo
Expand Down

0 comments on commit b507033

Please sign in to comment.