Permalink
Browse files

test that fail() can handle typed exceptions

  • Loading branch information...
moritz committed Mar 25, 2012
1 parent d720afa commit 2f179c121224ea014d2dc19df1a1acacb66dbf7a
Showing with 7 additions and 1 deletion.
  1. +7 −1 S04-exceptions/fail.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 12;
+plan 13;
# L<S04/Exceptions/The fail function>
@@ -62,6 +62,12 @@ plan 12;
isa_ok $f.exception, Exception, '... and it is an Exception';
}
+{
+ class AnEx is Exception { };
+ my $f = (sub f { fail AnEx.new }).();
+ isa_ok $f.exception, AnEx, 'can fail() typed exceptions';
+}
+
done;
# vim: ft=perl6

0 comments on commit 2f179c1

Please sign in to comment.