6 use Test::More tests => 5;
8 BEGIN { use_ok( 'Test::Exception' ) };
15 dies_ok { div(1, 0) } 'exception thrown okay in dies_ok';
16 like( $@, '/^Illegal division by zero/', 'exception preserved after dies_ok' );
18 throws_ok { div(1, 0) } '/^Illegal division by zero/', 'exception thrown okay in throws_ok';
19 like( $@, '/^Illegal division by zero/', 'exception preserved after thrown_ok' );