Collects multiple TestCase and reports their results. More...
#include <Testing.h>
Classes | |
| struct | IOutput |
| struct | Output |
Public Member Functions | |
| TestReport (IOutput &console, int argc, const char **argv) | |
| Build from a console and executable arguments. | |
| int | getTestReturnCode () const |
| Gets return code for this process. | |
| template<typename Statistics > | |
| void | runGlobalMemoryReport (Statistics stats, bool reportFailure=true) |
Public Attributes | |
| IOutput & | console |
| StringPath | libraryRootDirectory |
| Path to sources directory for library. | |
| StringPath | executableFile |
| Path to current executable. | |
| StringPath | 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 | ( | IOutput & | console, |
| int | argc, | ||
| const char ** | argv ) |
Build from a console and executable arguments.
| console | A Console object where to print test results |
| argc | Number of command line arguments |
| argv | Command line arguments Arguments |
|
nodiscard |
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.
| StringPath SC::TestReport::applicationRootDirectory |
Path to application (on macOS is different from executable path)
| bool SC::TestReport::debugBreakOnFailedTest = true |
If true will issue a debugger halt when a test fails.
| StringPath SC::TestReport::executableFile |
Path to current executable.
| StringPath 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.