Collects multiple TestCase and reports their results. More...
#include <Testing.h>
Public Member Functions | |
TestReport (Console &console, int argc, const char **argv) | |
Build from a console and executable arguments. | |
int | getTestReturnCode () const |
Gets return code for this process. | |
void | runGlobalMemoryReport (bool reportFailure=true) |
Runs a report for the Global Memory Allocator and prints its results. | |
Public Attributes | |
Console & | console |
The passed in console object where to print results. | |
StringView | libraryRootDirectory |
Path to sources directory for library. | |
StringView | executableFile |
Path to current executable. | |
StringView | applicationRootDirectory |
Path to application (on macOS is different from executable path) | |
bool | abortOnFirstFailedTest = true |
If true will abort after first failed test. | |
bool | debugBreakOnFailedTest = true |
If true will issue a debugger halt when a test fails. | |
bool | quietMode = false |
If true will not print recaps at start or end of the test. | |
Friends | |
struct | TestCase |
Collects multiple TestCase and reports their results.
This is passed as argument to SC::TestCase derived classes, and contains handle to globals like a console, paths to the library and application root, path to executable etc.
SC::TestReport::TestReport | ( | Console & | console, |
int | argc, | ||
const char ** | argv ) |
|
nodiscard |
Gets return code for this process.
-1
if tests are failed, 0
if tests are successful void SC::TestReport::runGlobalMemoryReport | ( | bool | reportFailure = true | ) |
Runs a report for the Global Memory Allocator and prints its results.
bool SC::TestReport::abortOnFirstFailedTest = true |
If true
will abort after first failed test.
StringView SC::TestReport::applicationRootDirectory |
Path to application (on macOS is different from executable path)
Console& SC::TestReport::console |
The passed in console object where to print results.
bool SC::TestReport::debugBreakOnFailedTest = true |
If true
will issue a debugger halt when a test fails.
StringView SC::TestReport::executableFile |
Path to current executable.
StringView SC::TestReport::libraryRootDirectory |
Path to sources directory for library.
bool SC::TestReport::quietMode = false |
If true
will not print recaps at start or end of the test.