Skip to content

Commit b7c9f9a

Browse files
committed
Streamline RT #131300 tests
- don't use eval-lives-ok
1 parent e53d219 commit b7c9f9a

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

β€ŽS02-types/set.tβ€Ž

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,18 +508,45 @@ subtest '.hash does not cause keys to be stringified' => {
508508

509509
# RT #131300
510510
subtest 'set ops do not hang with Setty/Baggy/Mixy type objects' => {
511-
my @ops := Β«
512-
∈ (elem) βˆ‰ !(elem) βˆ‹ (cont) ∌ !(cont) βŠ† (<=) ⊈ !(<=)
513-
βŠ‚ (<) βŠ„ !(<) βŠ‡ (>=) βŠ‰ !(>=) βŠƒ (>) βŠ… !(>)
514-
βˆͺ (|) ∩ (&) βˆ– (-) βŠ– (^) ⊍ (.) ⊎ (+)
515-
Β»;
511+
my @ops =
512+
&infix:<<∈>>, '∈',
513+
&infix:<<(elem)>>, '(elem)',
514+
&infix:<<βˆ‰>>, 'βˆ‰',
515+
&infix:<<βˆ‹>>, 'βˆ‹',
516+
&infix:<<(cont)>>, '(cont)',
517+
&infix:<<∌>>, '∌',
518+
&infix:<<βŠ†>>, 'βŠ†',
519+
&infix:<<(<=)>>, '(<=)',
520+
&infix:<<⊈>>, '⊈',
521+
&infix:<<βŠ‚>>, 'βŠ‚',
522+
&infix:<<(<)>>, '(<)',
523+
&infix:<<βŠ„>>, 'βŠ„',
524+
&infix:<<βŠ‡>>, 'βŠ‡',
525+
&infix:<<(>=)>>, '(>=)',
526+
&infix:<<βŠ‰>>, 'βŠ‰',
527+
&infix:<<βŠƒ>>, 'βŠƒ',
528+
&infix:<<(>)>>, '(>)',
529+
&infix:<<βŠ…>>, 'βŠ…',
530+
&infix:<<βˆͺ>>, 'βˆͺ',
531+
&infix:<<(|)>>, '(|)',
532+
&infix:<<∩>>, '∩',
533+
&infix:<<(&)>>, '(&)',
534+
&infix:<<βˆ–>>, 'βˆ– ',
535+
&infix:<<(-)>>, '(-)',
536+
&infix:<<βŠ–>>, 'βŠ–',
537+
&infix:<<(^)>>, '(^)',
538+
&infix:<<⊍>>, '⊍',
539+
&infix:<<(.)>>, '(.)',
540+
&infix:<<⊎>>, '⊎',
541+
&infix:<<(+)>>, '(+)',
542+
;
516543

517544
my @types := Set, SetHash, Bag, BagHash, Mix, MixHash;
518-
plan @ops Γ— @types;
545+
plan @ops Γ· 2 Γ— @types;
519546

520547
for @types -> $type {
521-
for @ops {
522-
eval-lives-ok "\$ = 1 $_ $type.perl()", "$type.perl() $_";
548+
for @ops -> &op, $name {
549+
lives-ok { op($ = 1, $type) }, "$type.perl() $name";
523550
}
524551
}
525552
}

0 commit comments

Comments
Β (0)