Skip to content
Browse files

more typed exception tests (X::ControlFlow, X::Method::InvalidQualifier)

  • Loading branch information...
1 parent 622ee63 commit eff5942adba4d8a30719871c9593cc49e9245598 @moritz moritz committed May 27, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 S32-exceptions/misc.t
View
10 S32-exceptions/misc.t
@@ -207,6 +207,10 @@ throws_like 'my class Priv { method x { self!foo } }; Priv.x',
method => '!foo',
typename => 'Priv',
private => { $_ === True };
+throws_like '1.List::join', X::Method::InvalidQualifier,
+ method => 'join',
+ invocant => 1,
+ qualifier-type => List;
# RT #58558
throws_like '!!! 42', X::AdHoc, payload => 42;
@@ -232,6 +236,12 @@ throws_like 'my class NC { }; NC.new does NC', X::Mixin::NonComposable,
throws_like 'my class NC { }; NC.new but NC', X::Mixin::NonComposable,
:target(*.defined), :rolish(*.^name eq 'NC');
+throws_like 'last', X::ControlFlow,
+ illegal => 'last', enclosing => 'loop construct';
+throws_like 'next', X::ControlFlow,
+ illegal => 'next', enclosing => 'loop construct';
+throws_like 'redo', X::ControlFlow,
+ illegal => 'redo', enclosing => 'loop construct';
done;

0 comments on commit eff5942

Please sign in to comment.
Something went wrong with that request. Please try again.