Checkpoint

Class that allows multiple assertions to be performed within a test, with any failures accumulated and reported together at the end of the test.

See the main documentation for trait Checkpoints for more information and an example.

class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(f: => Unit): Unit

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

def reportAll()(implicit pos: Position): Unit

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.