Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
untested implemented of eval_lives_ok
  • Loading branch information
moritz committed Feb 26, 2012
1 parent abaccdf commit 76de685
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Pugs/ext/Test/lib/Test.pm
Expand Up @@ -216,6 +216,16 @@ sub lives_ok (Code &code, Str $desc?, :$todo, :$depends) returns Bool is export
}
}

sub eval_lives_ok (Str $code, Str $desc = '' :$todo, :$depends) returns Bool is export {
eval $code;
if ($!) {
Test::proclaim(undef, $desc, $todo, "An exception was thrown : $!", :$depends);
}
else {
&Test::ok.nextwith(1, $desc, :$todo, :$depends);
}
}

sub done_testing() is export {
die "done_testing() has been renamed to done(), please change your test code";
}
Expand Down

0 comments on commit 76de685

Please sign in to comment.