PlasCom2  1.0
XPACC Multi-physics simluation application
manager< ResultsType > Class Template Reference

Interface for a general testing object. More...

Detailed Description

template<typename ResultsType = results>
class ix::test::manager< ResultsType >

Interface for a general testing object.

This object is meant to be the base class for testing objects that can easily be integrated into composite software packages with integrated testing facilities.

The general intention is that developers would implement all tests as member methods of classes inheriting from this class.

Definition at line 84 of file Testing.H.

#include <Testing.H>

Public Types

typedef ResultsType Results
 
typedef void(manager::* TestFunctionType) (ResultsType &)
 
typedef std::map< std::string, TestFunctionTypeFunctionMapType
 

Public Member Functions

virtual void Prologue ()
 Set up the tests and any test fixture constructs. More...
 
virtual void Process (Results &results)
 Process all tests and populate a "results" object. More...
 
virtual void ProcessTests (std::list< std::string > &names, Results &results)
 Process named tests from a list and populate a "results" object. More...
 
virtual void RunTest (const std::string &name, Results &results)
 Run a particular test. More...
 
virtual void Epilogue ()
 Clean up any test fixtures that need cleaning. More...
 
virtual void AddTest (const std::string &testName, TestFunctionType TestFunc)
 Add a test. More...
 
FunctionMapTypeFunctionMap ()
 
virtual void ListTests (std::ostream &outStream)
 
virtual ~manager ()
 

Protected Attributes

FunctionMapType testFunctionMap
 
Inheritance diagram for manager< ResultsType >:
Collaboration diagram for manager< ResultsType >:

Member Typedef Documentation

◆ FunctionMapType

typedef std::map<std::string,TestFunctionType> FunctionMapType

Definition at line 89 of file Testing.H.

◆ Results

typedef ResultsType Results

Definition at line 87 of file Testing.H.

◆ TestFunctionType

typedef void(manager::* TestFunctionType) (ResultsType &)

Definition at line 88 of file Testing.H.

Constructor & Destructor Documentation

◆ ~manager()

virtual ~manager ( )
inlinevirtual

Definition at line 132 of file Testing.H.

Member Function Documentation

◆ AddTest()

virtual void AddTest ( const std::string &  testName,
TestFunctionType  TestFunc 
)
inlinevirtual

Add a test.

Definition at line 123 of file Testing.H.

Referenced by testmanager::AddTest().

Here is the caller graph for this function:

◆ Epilogue()

virtual void Epilogue ( )
inlinevirtual

Clean up any test fixtures that need cleaning.

Reimplemented in ParallelTestingObject< CommType, ResultsType >, and TestingObject< ResultsType >.

Definition at line 121 of file Testing.H.

◆ FunctionMap()

FunctionMapType& FunctionMap ( )
inline

Definition at line 126 of file Testing.H.

◆ ListTests()

virtual void ListTests ( std::ostream &  outStream)
inlinevirtual

Definition at line 127 of file Testing.H.

◆ Process()

virtual void Process ( Results results)
inlinevirtual

Process all tests and populate a "results" object.

Reimplemented in ParallelTestingObject< CommType, ResultsType >, TestingObject< ResultsType >, testmanager, and testmanager.

Definition at line 93 of file Testing.H.

◆ ProcessTests()

virtual void ProcessTests ( std::list< std::string > &  names,
Results results 
)
inlinevirtual

Process named tests from a list and populate a "results" object.

Reimplemented in ParallelTestingObject< CommType, ResultsType >, TestingObject< ResultsType >, testmanager, and testmanager.

Definition at line 103 of file Testing.H.

◆ Prologue()

virtual void Prologue ( )
inlinevirtual

Set up the tests and any test fixture constructs.

Reimplemented in ParallelTestingObject< CommType, ResultsType >, TestingObject< ResultsType >, and testmanager.

Definition at line 91 of file Testing.H.

◆ RunTest()

virtual void RunTest ( const std::string &  name,
Results results 
)
inlinevirtual

Run a particular test.

Reimplemented in ParallelTestingObject< CommType, ResultsType >, and TestingObject< ResultsType >.

Definition at line 111 of file Testing.H.

Member Data Documentation

◆ testFunctionMap

FunctionMapType testFunctionMap
protected

Definition at line 132 of file Testing.H.


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