TestBase::TestCaseGroup Class Reference

Collects a group of named test-case definitions. More...

#include <TestBase.h>

List of all members.

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< Itemitems
 the test cases, in order of definition

Classes

struct  Item


Detailed Description

Collects a group of named test-case definitions.

Preserves the order; allows lookup by name.

Definition at line 122 of file TestBase.h.


Member Function Documentation

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 }


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:48 2009 for Fennel by  doxygen 1.5.1