Generic hardware access library
HAL::TestMaster Class Reference

A class to perform automated testing of classes. More...

#include <TestMaster.hh>

List of all members.

Public Member Functions

 TestMaster (std::ostream &os=std::cout)
void registerTester (TesterInterface &newTester)
 Register a class with testcode with the TestMaster.
bool doTest () throw (HardwareAccessException)
 Excecute a test with all registered objects.
void printShortReport ()
 Print the name of the test and if the test was successfull or not.
void printLongReport ()
 Print a long description of the test and if is was successfull.

Private Attributes

std::ostream & os_
std::list< TesterInterface * > testerList_
std::map< TesterInterface *, bool > resultMap_
bool testDone_

Detailed Description

A class to perform automated testing of classes.

The TestMaster can be used to perform automatic testing of software classes. The testcode for a software class must be implemented in a class which inherits from the TesterInterface. TesterInterfaces can be registered with teh TestMaster, all registered classes can be tested and the result of the test can be reported. In the HAL this is used to do tests on newly written classes.

See also:
Author:
Christoph Schwick
Revision:
1.1
Date:
2007/03/05 17:44:00

Definition at line 33 of file TestMaster.hh.


Constructor & Destructor Documentation

HAL::TestMaster::TestMaster ( std::ostream &  os = std::cout)

Definition at line 3 of file TestMaster.cc.


Member Function Documentation

Excecute a test with all registered objects.

This method calls the execute() method of all registered TesterInterfaces.

Definition at line 12 of file TestMaster.cc.

Print a long description of the test and if is was successfull.

Definition at line 44 of file TestMaster.cc.

Print the name of the test and if the test was successfull or not.

Definition at line 33 of file TestMaster.cc.

Register a class with testcode with the TestMaster.

Definition at line 8 of file TestMaster.cc.


Member Data Documentation

std::ostream& HAL::TestMaster::os_ [private]

Definition at line 61 of file TestMaster.hh.

std::map< TesterInterface*, bool > HAL::TestMaster::resultMap_ [private]

Definition at line 63 of file TestMaster.hh.

Definition at line 64 of file TestMaster.hh.

Definition at line 62 of file TestMaster.hh.


The documentation for this class was generated from the following files: