XUnitTest Class Reference
#include <test.h>
List of all members.
Detailed Description
Basic test class. All tests are derived from this class.
Constructor & Destructor Documentation
| XUnitTest::XUnitTest |
( |
const char * |
aName |
) |
|
Constructor. Saves the name of the test.
- Parameters:
-
| aName | NUL terminated string containing the test name. |
| virtual XUnitTest::~XUnitTest |
( |
|
) |
[virtual] |
Member Function Documentation
| static void XUnitTest::doOptions |
( |
int |
argc, |
|
|
char ** |
argv | |
|
) |
| | [static] |
Static method to take the parameters from main() and run the tests accordingly. It needn't be used, but if it is then it saves a lot of option-handling code. For instance, the following code can by used for main():
- Parameters:
-
| argc | number of parameters, including initial program name. |
| argv | array of pointers to arguments. First string is used as program name in help text. |
| virtual void XUnitTest::doTest |
( |
|
) |
[pure virtual] |
Virtual method for the test itself. The actual test class implements this function to do the testing.
| const char* XUnitTest::getName |
( |
|
) |
const |
Get the name of the test.
- Returns:
- NUL-terminated string containing the test name.
Static method to retrieve a pointer to the test result object. If this has not been set by the time this method is called then it will be set as the default base result class.
- Returns:
- pointer to the currently set result object.
| static void XUnitTest::run |
( |
const char * |
aTestName = "" |
) |
[static] |
Static method to run the tests. The optional argument specifies a test name prefix, only tests with names matching that prefix will be run.
- Parameters:
-
| aTestName | test name prefix, or NULL to run all tests. |
Static method to set the result class object. If it is not set by the time the test is run, the default base result class will be used.
- Parameters:
-
| apResult | Pointer to the result test class object. |
The documentation for this class was generated from the following file: