#include <TestBase.h>
Public Member Functions | |
void | addTest (std::string name, boost::unit_test::test_unit *tu) |
boost::unit_test::test_unit * | findTest (std::string name) const |
void | addAllToTestSuite (TestSuite *) const |
Private Attributes | |
std::vector< Item > | items |
the test cases, in order of definition | |
Classes | |
struct | Item |
Preserves the order; allows lookup by name.
Definition at line 122 of file TestBase.h.
void TestBase::TestCaseGroup::addTest | ( | std::string | name, | |
boost::unit_test::test_unit * | tu | |||
) |
test_unit * TestBase::TestCaseGroup::findTest | ( | std::string | name | ) | const |
Definition at line 192 of file TestBase.cpp.
References items.
Referenced by TestBase::releaseTestSuite().
00193 { 00194 for (std::vector<Item>::const_iterator p = items.begin(); 00195 p != items.end(); ++p) 00196 { 00197 if (name == p->name) { 00198 return p->tu; 00199 } 00200 } 00201 return 0; 00202 }
void TestBase::TestCaseGroup::addAllToTestSuite | ( | TestSuite * | ) | const |
Definition at line 204 of file TestBase.cpp.
References items.
Referenced by TestBase::releaseTestSuite().
00205 { 00206 for (std::vector<Item>::const_iterator p = items.begin(); 00207 p != items.end(); ++p) 00208 { 00209 suite->add(p->tu); 00210 } 00211 }
std::vector<Item> TestBase::TestCaseGroup::items [private] |
the test cases, in order of definition
Definition at line 132 of file TestBase.h.
Referenced by addAllToTestSuite(), and findTest().