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. More... | |
int | getTestReturnCode () const |
Gets return code for this process. More... | |
Public Attributes | |
Console & | console |
The passed in console object where to print results. More... | |
StringView | libraryRootDirectory |
Path to sources directory for library. More... | |
StringView | executableFile |
Path to current executable. More... | |
StringView | applicationRootDirectory |
Path to application (on macOS is different from executable path) More... | |
bool | abortOnFirstFailedTest = true |
If true will abort after first failed test. More... | |
bool | debugBreakOnFailedTest = true |
If true will issue a debugger halt when a test fails. More... | |
bool | quietMode = false |
If true will not print recaps at start or end of the test. More... | |
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 | ||
) |
int SC::TestReport::getTestReturnCode | ( | ) | const |
Gets return code for this process.
-1
if tests are failed, 0
if tests are successful 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.