Skip to content

Commit

Permalink
[v6.d REVIEW] Unfudge min/max flattening tests
Browse files Browse the repository at this point in the history
The skip-fudge expects no flattening to happen with single-arg
`[min]`/`[max]` with Range arg, but I don't see what would be a
viable answer in such a case, other than min/maxing the Range's
endpoints, which would merely be *an optimization*, not a functional
difference, and IMO should not be specced. (N.B.: don't see
an easy way to perform that opt in Rakudo, as &METAOP_REDUCE_LIST
makes a routine with a +slurpy).

Change the fudge to more-than-one arg tests, to ensure flattening
is not done there, as in these cases the result would be different
if flattening were done.
  • Loading branch information
zoffixznet committed Dec 31, 2017
1 parent 3589f5f commit ecf8c6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions S32-list/minmax.t
Expand Up @@ -133,9 +133,8 @@ is (-Inf, Inf).max, Inf,"Inf is greater than -Inf";
#is (0, NaN).max, NaN, "max(0,NaN)=NaN";
#is (Inf, NaN).max, NaN, "max(Inf,NaN)=NaN";

#?rakudo 2 skip "post-GLR"
is ([min] 42..4200000000000000000), 42, '[min] does not flatten';
is ([max] -4200000000000000000..42), 42, '[max] does not flatten';
is ([min] 42..420000000000000, -700), -700, 'multi-arg [min] does not flatten';
is ([max] 42..420000000000000, 700), 700, 'multi-arg [max] does not flatten';

is ([min] 5,10,-15,20), -15, 'reduce min int';
is ([max] 5,10,-15,20), 20, 'reduce max int';
Expand Down

0 comments on commit ecf8c6d

Please sign in to comment.