TestContext is a class that holds the test results and reporter context. There are 8 different matrices that are used to store the test results.
More...
#include <unittest.h>
TestContext is a class that holds the test results and reporter context. There are 8 different matrices that are used to store the test results.
- passed : Number of passed tests
- warning : Number of tests that passed with warning
- failed : Number of failed tests
- skipped : Number of skipped tests
- passed_as : Number of passed tests in assertion
- warning_as: Number of tests that passed with warning in assertion
- failed_as : Number of failed tests in assertion
- skipped_as: Number of skipped tests in assertion
◆ TestContext()
zeroerr::TestContext::TestContext |
( |
IReporter & |
reporter | ) |
|
|
inline |
Construct a new Test Context object.
- Parameters
-
reporter | The reporter object that will be used to report the test results. |
◆ ~TestContext()
zeroerr::TestContext::~TestContext |
( |
| ) |
|
|
default |
◆ add()
Add the subtest results to the matrices.
- Parameters
-
local | The local test context that will be added to the global context. |
- Returns
- int 0 if the test passed, 1 if the test passed with warning, 2 if the test failed.
◆ reset()
void zeroerr::TestContext::reset |
( |
| ) |
|
◆ save_output()
void zeroerr::TestContext::save_output |
( |
| ) |
|
Save the output of the test to the correct_output_path as a golden file.
◆ failed
unsigned zeroerr::TestContext::failed = 0 |
◆ failed_as
unsigned zeroerr::TestContext::failed_as = 0 |
◆ passed
unsigned zeroerr::TestContext::passed = 0 |
◆ passed_as
unsigned zeroerr::TestContext::passed_as = 0 |
◆ reporter
◆ skipped
unsigned zeroerr::TestContext::skipped = 0 |
◆ skipped_as
unsigned zeroerr::TestContext::skipped_as = 0 |
◆ warning
unsigned zeroerr::TestContext::warning = 0 |
◆ warning_as
unsigned zeroerr::TestContext::warning_as = 0 |
The documentation for this class was generated from the following files: