printOnFailure function

void printOnFailure (
  1. String message
)

Prints message if and when the current test fails.

This is intended for test infrastructure to provide debugging information without cluttering the output for successful tests. Note that unlike print, each individual message passed to printOnFailure will be separated by a blank line.

Implementation

void printOnFailure(String message) => Invoker.current.printOnFailure(message);