Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #40 from Nami-Doc/patch-2
Use `default` to mark exceptions as handled (instead of skipping the rest of the test fiile)
  • Loading branch information
timo committed Apr 5, 2014
2 parents 57c7c92 + 5493dc6 commit 9191138
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions S03-operators/orelse.t
Expand Up @@ -15,15 +15,15 @@ nok $tracker, 'orelse thunks';
{
try {
die "oh noes!" orelse pass("orelse continues after an exception");
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

#?rakudo todo "orelse exception semantics"
{
try {
die "oh noes!" orelse ok(~$! eq "oh noes!", "orelse sets $! after an exception");
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

Expand All @@ -33,7 +33,7 @@ nok $tracker, 'orelse thunks';
die "oh noes!" orelse -> $foo {
ok ~$foo eq "oh noes!", "orelse passes $! to one argument after an exception";
};
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

Expand All @@ -43,7 +43,7 @@ nok $tracker, 'orelse thunks';
die "oh noes!" orelse -> $foo, $bar {
ok ~$foo eq "oh noes!" && ~$bar eq "oh noes!", "orelse passes $! to two arguments after an exception";
};
CATCH { flunk "orelse shouldn't rethrow exceptions" }
CATCH { default { flunk "orelse shouldn't rethrow exceptions" } }
}
}

Expand Down

0 comments on commit 9191138

Please sign in to comment.