UnitTest is a class that holds the test configuration. There are several options that can be set to configure the test.
More...
#include <unittest.h>
UnitTest is a class that holds the test configuration. There are several options that can be set to configure the test.
- silent : If true, the test will not print the test results.
- run_bench : If true, the test will run the benchmark tests.
- run_fuzz : If true, the test will run the fuzz tests.
- list_test_cases : If true, the test will list the test cases.
- no_color : If true, the test will not print the test results with color.
- log_to_report : If true, the test will log the test results to the report.
- correct_output_path : The path that the golden files will be saved.
- reporter_name : The name of the reporter that will be used to report the test results.
- binary : The binary name that will be used to run the test.
- filters : The filters that will be used to filter the test cases.
◆ parseArgs()
UnitTest & zeroerr::UnitTest::parseArgs |
( |
int |
argc, |
|
|
const char ** |
argv |
|
) |
| |
Parse the arguments to configure the test.
- Parameters
-
argc | The number of arguments. |
argv | The arguments. |
- Returns
- UnitTest& The test configuration.
◆ run()
int zeroerr::UnitTest::run |
( |
| ) |
|
Run the test.
- Returns
- int 0 if the test passed.
◆ run_filter()
bool zeroerr::UnitTest::run_filter |
( |
const TestCase & |
tc | ) |
|
Run the test with the given filter.
- Parameters
-
tc | The test case that will be run. |
- Returns
- true If the test passed.
-
false If the test failed.
◆ binary
std::string zeroerr::UnitTest::binary |
◆ correct_output_path
std::string zeroerr::UnitTest::correct_output_path |
◆ filters
struct Filters* zeroerr::UnitTest::filters |
◆ list_test_cases
bool zeroerr::UnitTest::list_test_cases = false |
◆ log_to_report
bool zeroerr::UnitTest::log_to_report = false |
◆ no_color
bool zeroerr::UnitTest::no_color = false |
◆ reporter_name
std::string zeroerr::UnitTest::reporter_name = "console" |
◆ run_bench
bool zeroerr::UnitTest::run_bench = false |
◆ run_fuzz
bool zeroerr::UnitTest::run_fuzz = false |
◆ silent
bool zeroerr::UnitTest::silent = false |
The documentation for this struct was generated from the following files: