Skip to content

Commit

Permalink
typed exceptions for PRE/POST failures
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Mar 18, 2012
1 parent ba26d03 commit efa9610
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions S32-exceptions/misc.t
Expand Up @@ -175,4 +175,7 @@ throws_like 'constant * = 3;', X::Syntax::Missing, what => /constant/;

throws_like 'class A {...}; grammar B { ... }', X::Package::Stubbed, packages => <A B>;

throws_like 'my sub a { PRE 0 }; a()', X::Phaser::PrePost, what => 'Precondition', condition => /0/;
throws_like 'my sub a { POST 0 }; a()', X::Phaser::PrePost, what => 'Postcondition', condition => /0/;

done;

0 comments on commit efa9610

Please sign in to comment.