printOnFailure function

void printOnFailure (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);