|
Frobby
0.9.5
|
Represents a collection of tests, be they individual tests or yet other collections of tests. More...
#include <TestSuite.h>
Public Types | |
| typedef vector< Test * >::iterator | TestIterator |
| An iterator for the added tests. More... | |
Public Member Functions | |
| TestSuite (const string &name) | |
| Constructs a test suite with the given name. More... | |
| void | add (Test *test) |
| Adds a test to the test suite. More... | |
| void | sortTests () |
| Sorts the added tests in some canonical order. More... | |
| TestIterator | begin () |
| Returns an iterator to the beginning of the range of added tests. More... | |
| TestIterator | end () |
| Returns an iterator just past the end of the range of added tests. More... | |
| virtual bool | accept (TestVisitor &visitor) |
| Makes the visitor visit this object as per the Visitor Pattern. More... | |
Public Member Functions inherited from Test | |
| Test (const string &name) | |
| Construct a Test with the given name. More... | |
| virtual | ~Test () |
| const string & | getName () const |
| Returns the name passed to the constructor. More... | |
| bool | operator< (const Test &test) const |
| Compares names lexicographically. More... | |
Private Attributes | |
| vector< Test * > | _tests |
| The collection of tests of added tests. More... | |
Represents a collection of tests, be they individual tests or yet other collections of tests.
This class is a composite as per the Composite pattern, and can be visited by a TestVisitor according to the Visitor Pattern.
Definition at line 28 of file TestSuite.h.
| typedef vector<Test*>::iterator TestSuite::TestIterator |
An iterator for the added tests.
Definition at line 42 of file TestSuite.h.
| TestSuite::TestSuite | ( | const string & | name | ) |
Constructs a test suite with the given name.
Definition at line 23 of file TestSuite.cpp.
|
virtual |
Makes the visitor visit this object as per the Visitor Pattern.
Implements Test.
Definition at line 55 of file TestSuite.cpp.
| void TestSuite::add | ( | Test * | test | ) |
Adds a test to the test suite.
This can be another TestSuite or an individual TestCase.
Definition at line 27 of file TestSuite.cpp.
| TestSuite::TestIterator TestSuite::begin | ( | ) |
Returns an iterator to the beginning of the range of added tests.
Definition at line 47 of file TestSuite.cpp.
| TestSuite::TestIterator TestSuite::end | ( | ) |
Returns an iterator just past the end of the range of added tests.
Definition at line 51 of file TestSuite.cpp.
| void TestSuite::sortTests | ( | ) |
Sorts the added tests in some canonical order.
Definition at line 43 of file TestSuite.cpp.
|
private |
The collection of tests of added tests.
Definition at line 58 of file TestSuite.h.