Executes the passed block of code and catches and records for later reporting (via reportAll) any exceptions that mix in StackDepth except for TestCanceledException, TestRegistrationClosedException , NotAllowedException , and DuplicateTestNameException .
Executes the passed block of code and catches and records for later reporting (via reportAll) any exceptions that mix in StackDepth except for TestCanceledException, TestRegistrationClosedException , NotAllowedException , and DuplicateTestNameException .
If the block of code completes abruptly with any of the StackDepth exceptions in the previous list, or any non-StackDepth exception, that invocation of this apply method will complete abruptly with the same exception.
Value parameters
f
the block of code, likely containing one or more assertions, to execute
If any failures were caught by checkpoints, throws a TestFailedException whose detail message lists the failure messages and line numbers from each of the failed checkpoints.
If any failures were caught by checkpoints, throws a TestFailedException whose detail message lists the failure messages and line numbers from each of the failed checkpoints.