Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test that fail() can handle typed exceptions
  • Loading branch information
moritz committed Mar 25, 2012
1 parent d720afa commit 2f179c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S04-exceptions/fail.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 12;
plan 13;

# L<S04/Exceptions/The fail function>

Expand Down Expand Up @@ -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.