UTPP
|
Macros | |
#define | TEST_MAIN(ARGC, ARGV) |
Functions | |
int | UnitTest::RunAllTests (Reporter &rpt=GetDefaultReporter(), int max_time_ms=0) |
Run all tests from all test suites. | |
int | UnitTest::RunSuite (const char *suite_name, Reporter &rpt=GetDefaultReporter(), int max_time_ms=0) |
Run all tests from one suite. | |
void | UnitTest::DisableSuite (const std::string &suite_name) |
Disable a test suite. | |
void | UnitTest::EnableSuite (const std::string &suite_name) |
Enable a test suite. | |
#define TEST_MAIN | ( | ARGC, | |
ARGV ) |
Replacement macro for main function.
This macro is used instead of int main(int argc, char** argv)
function if you are compiling under C++11 or C++14 language rules. If you are compiling under C++17 or newer language rules, you can use the normal main
function.
|
inline |
Disable a test suite.
By default, the UnitTest::RunAllTests() function runs all test suites. You can disable a specific suite using this function.
suite_name | name of suite to disable |
|
inline |
Enable a test suite.
Re-enables a test suite that has been previously disabled.
suite_name | name of suite to enable |
|
inline |
Run all tests from all test suites.
Runs all test suites and produces results using the given reporter.
rpt | Reporter used to generate results |
max_time_ms | Global time constraint or 0 if there is no time constraint. |
Each test is expected to run in under max_time_ms milliseconds. If a test takes longer, it generates a time constraint failure.
All previous statistics of the reporter object are erased.
|
inline |
Run all tests from one suite.
Runs all tests from one suite
suite_name | Name of the suite to run |
rpt | Test reporter to be used for results |
max_time_ms | Global time constraint in milliseconds |