Skip to content

Commit

Permalink
Revert "Change incorrect &list(Seq) tests"
Browse files Browse the repository at this point in the history
This reverts commit 6636645.

They're right if you squint hard enough and alternatives are worse:
https://irclog.perlgeek.de/perl6-dev/2017-12-31#i_15636448
  • Loading branch information
zoffixznet committed Dec 31, 2017
1 parent 44602bd commit 51d2569
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions S03-operators/context-forcers.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 104;
plan 106;

#?DOES 1
sub iis(Mu $a, Mu $b, $descr) {
Expand Down Expand Up @@ -229,14 +229,18 @@ sub eval_elsewhere($code){ EVAL($code) }

{
my $l = list 1,2,4...16;
ok $l.WHAT === List, "list listop on Seq produces a List";
ok $l.WHAT === Seq, "list listop on Seq is no-op";
ok $l.gist eq '(1 2 4 8 16)', "list listop doesn't double wrap";
my \seq = 1,2,4...16;
dies-ok { sink (list seq)».abs, (list seq)».abs }, "list listop doesn't cache";
}

{
my $l = list 1..5;
ok $l.WHAT === List, "list listop on non-Seq is List";
ok $l.gist eq '(1 2 3 4 5)', "list listop doesn't double wrap";
my \seq = $l.grep(* > 0);
dies-ok { sink (list seq)».abs, (list seq)».abs }, "list listop doesn't cache";
}

{
Expand Down

0 comments on commit 51d2569

Please sign in to comment.