class
TestOutput
Abstract interface used for outputting unit test results.
Public
Methods
~TestOutput
virtual ~TestOutput() noexcept
DoOnOutputFail
virtual void DoOnOutputFail(const String &description, const String &function, const String &file, long line) = 0
Triggered when a unit test fails.
- description
- Reason why the unit test failed.
- function
- Name of the function the test failed in.
- file
- File the unit test failed in.
- line
- Line of code the unit test failed on.
DoOnOutputSuccess
virtual void DoOnOutputSuccess(const String &testName)
Triggered when a unit test succeeds (optional to implement).
- testName
- Name of the test that succeeded.
DoOnSuiteStart
virtual void DoOnSuiteStart(const String &suiteName)
Triggered when a test suite starts executing.
- suiteName
- Name of the test suite being executed.
DoOnSuiteEnd
virtual void DoOnSuiteEnd(const String &suiteName, u32 totalTestCount, u32 passedTestCount, u32 failedTestCount, u64 durationUs)
Triggered when a test suite finishes executing.
- suiteName
- Name of the test suite that finished.
- totalTestCount
- Total number of tests in the suite.
- passedTestCount
- Number of tests that passed.
- failedTestCount
- Number of tests that failed.
- durationUs
- Total execution time in microseconds.
DoOnTestStart
virtual void DoOnTestStart(const String &testName)
Triggered when an individual test starts executing.
- testName
- Name of the test being executed.
DoOnTestEnd
virtual void DoOnTestEnd(const String &testName, bool passed, u64 durationUs)
Triggered when an individual test finishes executing.
- testName
- Name of the test that finished.
- passed
- True if the test passed, false if it failed.
- durationUs
- Execution time in microseconds.