#include <testsuite.hh>
Public Member Functions | |
| TestSuite (const string &name, ostream *osptr=0) | |
| string | getName () const |
| Returns name of test suite. | |
| long | getNumPassed () const |
| Returns number of passed tests. | |
| long | getNumFailed () const |
| Returns number of failed tests. | |
| const ostream * | getStream () const |
| Returns output stream. | |
| void | setStream (ostream *osptr) |
| Sets the output stream. | |
| void | addTest (TestCase *t) |
| Adds a test case to the suite of tests. | |
| void | addSuite (const TestSuite &) |
| Adds a test suite to this test suite. | |
| void | run () |
| Runs all test cases in the suite. | |
| long | report () const |
| void | free () |
| Deletes the tests. | |
Suite of tests. Running a group of test cases is best be done by adding each test case to a test suite. This suite does then the run and report of the whole group.
Definition at line 41 of file testsuite.hh.
|
inline |
Constructor.
| name | Name of the test suite |
| osptr | Pointer to the output stream. Defaults to stdout. |
Definition at line 85 of file testsuite.hh.
|
inline |
Returns name of test suite.
Definition at line 50 of file testsuite.hh.
|
inline |
Returns output stream.
Definition at line 56 of file testsuite.hh.
| long test::TestSuite::report | ( | ) | const |
Prints a report on the number of passed and failed tests in the whole suite to the output stream.
|
inline |
Sets the output stream.
Definition at line 58 of file testsuite.hh.