Skip to content

Commit

Permalink
more typed exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jan 30, 2012
1 parent 31654a6 commit 2002a2f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions S32-exceptions/misc.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use v6;
use Test;

#?DOES 1
sub throws_like($code, $ex_type, *%matcher) {
my $msg;
if $code ~~ Callable {
Expand Down Expand Up @@ -114,4 +115,12 @@ throws_like 'sub f(*@a, $b?) { }', X::Parameter::WrongOrder,
misplaced => 'optional positional',
after => 'variadic';

#?rakudo skip 'parsing regression'
throws_like '#`', X::Syntax::Comment::Embedded;
#?rakudo skip 'parsing regression'
throws_like '=begin', X::Syntax::Pod::BeginWithoutIdentifier;

throws_like '@', X::Syntax::SigilWithoutName;
throws_like '1∞', X::Syntax::Confused;

done;

0 comments on commit 2002a2f

Please sign in to comment.