Test class for unit test framework. More...
Public Member Functions | |
test_class () | |
Constructor. More... | |
virtual | ~test_class () |
Destructor. More... | |
bool | run () |
Run Unit test's setup, test, and teardown functions. More... | |
Protected Member Functions | |
virtual void | setup () |
Setup data to be tested. More... | |
virtual void | test ()=0 |
Test data. More... | |
virtual void | tear_down () |
Teardown data which was tested. More... | |
bool | all_tests_passed () const |
void | assert_msg (bool b, std::string msg) |
Assert a unit test passes. More... | |
Private Attributes | |
bool | fail = false |
Stores if any test case has failed. More... | |
Test class for unit test framework.
test_class::test_class | ( | ) |
Constructor.
|
virtual |
Destructor.
bool test_class::run | ( | ) |
Run Unit test's setup, test, and teardown functions.
|
protectedvirtual |
Setup data to be tested.
|
protectedpure virtual |
Test data.
Implemented in map_test.
|
protectedvirtual |
Teardown data which was tested.
|
protected |
|
protected |
Assert a unit test passes.
b | Conditional for assert |
msg | Message on fail |
|
private |
Stores if any test case has failed.