36 bool comparePointedToValue(
const Test* a,
const Test* b) {
44 std::sort(
begin(),
end(), comparePointedToValue);
56 return visitor.
visit(*
this);
TestSuite(const string &name)
Constructs a test suite with the given name.
TestIterator begin()
Returns an iterator to the beginning of the range of added tests.
vector< Test * > _tests
The collection of tests of added tests.
vector< Test * >::iterator TestIterator
An iterator for the added tests.
void sortTests()
Sorts the added tests in some canonical order.
void add(Test *test)
Adds a test to the test suite.
TestIterator end()
Returns an iterator just past the end of the range of added tests.
virtual bool accept(TestVisitor &visitor)
Makes the visitor visit this object as per the Visitor Pattern.
This class is a visitor for classes derived from Test according to the Visitor Pattern.
virtual bool visit(TestCase &testCase)
Visits a testCase and returns true if visiting of any other objects should continue after the testSui...
This class represents a test or a suite of tests according to the Composite Pattern.