#include <testcase.h>
Public Member Functions | |
| TestCase (const SimpleString &name, TestResult *testResult) | |
| Main TestCase constructor. | |
| virtual | ~TestCase () |
| void | addTest (Test *test) |
| Add a Test to the Test list. | |
| Test * | getTests () const |
| Get the Test list. | |
| void | run () |
| Execute all Tests in the Test list of this TestCase. | |
| int | getTestsCount () const |
| Get the Test list size (number of Tests in this TestCase). | |
| int | getFailuresCount () const |
| Get the total number of failures reported by all Tests. | |
| int | getSuccessesCount () const |
| Get the total number of successes reported by all Tests. | |
| int | getErrorsCount () const |
| Get the total number of errors reported by all Tests. | |
| bool | ran () const |
| Indicates whether or not this TestCase was executed. | |
| const SimpleString & | getName () const |
| Get the TestCase name. | |
| TestCase * | getNext () const |
| Get the next TestCase in the list. | |
| void | setNext (TestCase *testCase) |
| Set the next TestCase in the list. | |
Protected Attributes | |
| int | failuresCount_ |
| int | successesCount_ |
| int | errorsCount_ |
| int | testsCount_ |
| Test * | tests_ |
| SimpleString | name_ |
| TestCase * | nextTestCase_ |
| TestResult * | testResult_ |
Private Member Functions | |
| void | updateCount (Test *test) |
| void | runTests (Test *test) |
| void | runTest (Test *test) |
Private Attributes | |
| bool | ran_ |
|
||||||||||||
|
Main TestCase constructor.
|
|
|
|
|
|
This method is used by TestRegistry.
|
|
|
Get the total number of errors reported by all Tests.
|
|
|
Get the total number of failures reported by all Tests.
|
|
|
Get the TestCase name. This name is specified by the first parameter of the Test declaration. For example, if a test was declared as TEST(TESTCASE1, TEST1), the TestCase name would be "TESTCASE1".
|
|
|
Get the next TestCase in the list.
|
|
|
Get the total number of successes reported by all Tests.
|
|
|
Get the Test list.
|
|
|
Get the Test list size (number of Tests in this TestCase).
|
|
|
Indicates whether or not this TestCase was executed.
|
|
|
Execute all Tests in the Test list of this TestCase. In fact, it calls the run() method of all Tests. |
|
|
|
|
|
|
|
|
Set the next TestCase in the list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.8