Skip to content

Commit

Permalink
Set ops do not hang with Setty/Baggy/Mixie type objects
Browse files Browse the repository at this point in the history
RT#131300: https://rt.perl.org/Ticket/Display.html?id=131300

Some ops still hang; skip() them
  • Loading branch information
zoffixznet committed Oct 15, 2017
1 parent 08ac054 commit 8788989
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion S02-types/set.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 217;
plan 218;

sub showset($s) { $s.keys.sort.join(' ') }

Expand Down Expand Up @@ -506,4 +506,26 @@ subtest '.hash does not cause keys to be stringified' => {
message => { m/'Use of non-subscript brackets after "set" where postfix is expected'/ };
}

# RT #131300
subtest 'set ops do not hang with Setty/Baggy/Mixie type objects' => {
my @ops := Β«
∈ (elem) βˆ‰ !(elem) βˆ‹ (cont) ∌ !(cont) βŠ† (<=) ⊈ !(<=)
βŠ‚ (<) βŠ„ !(<) βŠ‡ (>=) βŠ‰ !(>=) βŠƒ (>) βŠ… !(>)
βˆͺ (|) ∩ (&) βˆ– (-) βŠ– (^) ⊍ (.) ⊎ (+)
Β»;

my @types := Set, SetHash, Bag, BagHash, Mix, MixHash;
plan @ops Γ— @types;

my %SKIPS := set «∩ (&) ⊍ (.) βˆ– (-)Β»;

for @types -> $type {
for @ops {
%SKIPS{$_}
?? skip "$type.perl(): $_ op hangs or is broken RT#131300"
!! eval-lives-ok "\$ = 1 $_ $type.perl()", "$type.perl() $_";
}
}
}

# vim: ft=perl6

0 comments on commit 8788989

Please sign in to comment.