Frobby
0.9.5
|
Represents a test case, which is usually created through a macro that defines a subclass. More...
#include <TestCase.h>
Public Member Functions | |
TestCase (const string &name) | |
Construct a test case with the given name. More... | |
virtual bool | accept (TestVisitor &visitor) |
Makes the visitor visit this object as per the Visitor Pattern. More... | |
virtual void | run (const char *nameOfTest, bool printDots)=0 |
Run the test and record the name of the test as __nameOfTest. 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... | |
Represents a test case, which is usually created through a macro that defines a subclass.
This class is a leaf of the Composite Pattern, and can be visited by a TestVisitor according to the Visitor Pattern.
Definition at line 29 of file TestCase.h.
TestCase::TestCase | ( | const string & | name | ) |
Construct a test case with the given name.
Definition at line 22 of file TestCase.cpp.
|
virtual |
Makes the visitor visit this object as per the Visitor Pattern.
Implements Test.
Definition at line 26 of file TestCase.cpp.
|
pure virtual |
Run the test and record the name of the test as __nameOfTest.
This can be a more detailed name, and it can be derived from the name that is returned by getName(), or it can be unrelated. This provides needed flexibility. printDots indicates whether to print dots when individual assertions succeed.