|
MoSync 3.2.1
|
A test case. This class should be overloaded to handle test cases. More...
#include <testify/testcase.hpp>
Public Member Functions | |
| TestCase (const char *n="no_name_testcase") | |
| virtual | ~TestCase (void) |
| virtual void | caseSetUp (void) |
| virtual void | caseTearDown (void) |
| virtual void | testSetUp (void) |
| virtual void | testTearDown (void) |
| void | addTest (Functor *f, const char *n="no_name_test_method") |
| virtual void | run (void) |
Static Public Member Functions | |
| static Test * | create (Functor *f, const char *n="no_name_function") |
A test case. This class should be overloaded to handle test cases.
It has global set up and tear down, as well as a set up and tear down for each test. Using them are optional, to use them one has to overload
To add a test method, one invokes the addTest(...) method from the constructor once for each test. It's arguments are
| Testify::TestCase::TestCase | ( | const char * | n = "no_name_testcase" | ) |
Constructor
| n | Test case name, default value is 'no_name_case' |
| virtual Testify::TestCase::~TestCase | ( | void | ) | [virtual] |
Destructor
| virtual void Testify::TestCase::caseSetUp | ( | void | ) | [virtual] |
Called once before any test has run Note: Overload if you need a custom version
| virtual void Testify::TestCase::caseTearDown | ( | void | ) | [virtual] |
Called once after all tests have run Note: Overload if you need a custom version
| virtual void Testify::TestCase::testSetUp | ( | void | ) | [virtual] |
Called once before every test Note: Overload if you need a custom version
| virtual void Testify::TestCase::testTearDown | ( | void | ) | [virtual] |
Called once after each test Note: Overload if you need a custom version
| void Testify::TestCase::addTest | ( | Functor * | f, |
| const char * | n = "no_name_test_method" |
||
| ) |
Adds a test case
| f | Pointer to functor which contains the test |
| n | Name of test, default value is 'no_name_test_method' |
| virtual void Testify::TestCase::run | ( | void | ) | [virtual] |
Runs tests
Implements Testify::Test.
| static Test* Testify::Test::create | ( | Functor * | f, |
| const char * | n = "no_name_function" |
||
| ) | [static, inherited] |
Creates a test function
| f | Pointer to a functor which contains the test |
| n | Test name, default value is 'no_name_function' |