Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cUnitTestRegister Class Referenceabstract

#include <cUnitTest.h>

Inheritance diagram for Gray::cUnitTestRegister:
Gray::cUnitTestRegisterT< T >

Public Member Functions

void RunUnitTest ()
 Create and run the unit test cUnitTest. More...
 

Public Attributes

const LOGCHAR_tm_pszTestName
 Display Name for the unit test. More...
 
const UNITTEST_LEVEL_TYPE m_nTestLevel
 at what level does this test run? More...
 

Protected Member Functions

 cUnitTestRegister (const LOGCHAR_t *pszTestName, UNITTEST_LEVEL_TYPE nTestLevel=UNITTEST_LEVEL_Core)
 
virtual ~cUnitTestRegister ()
 
virtual cUnitTestCreateUnitTest ()=0
 must implement this. More...
 

Detailed Description

Hold the registration for a type of cUnitTest. ALWAYS constructed in 'C' static init code. The cUnitTest itself is constructed on run demand. Assume static init is NOT multi threaded so no thread locking is required.

Constructor & Destructor Documentation

◆ cUnitTestRegister()

Gray::cUnitTestRegister::cUnitTestRegister ( const LOGCHAR_t pszTestName,
UNITTEST_LEVEL_TYPE  nTestLevel = UNITTEST_LEVEL_Core 
)
protected

May be constructed in 'C' static init code. register myself in the unit test list.

◆ ~cUnitTestRegister()

Gray::cUnitTestRegister::~cUnitTestRegister ( )
protectedvirtual

When a module is released, all its unit tests MUST be destroyed.

Member Function Documentation

◆ CreateUnitTest()

virtual cUnitTest* Gray::cUnitTestRegister::CreateUnitTest ( )
protectedpure virtual

must implement this.

Implemented in Gray::cUnitTestRegisterT< T >.

◆ RunUnitTest()

void Gray::cUnitTestRegister::RunUnitTest ( )

Create and run the unit test cUnitTest.

Create the cUnitTest object and run the cUnitTest.

Member Data Documentation

◆ m_nTestLevel

const UNITTEST_LEVEL_TYPE Gray::cUnitTestRegister::m_nTestLevel

at what level does this test run?

◆ m_pszTestName

const LOGCHAR_t* Gray::cUnitTestRegister::m_pszTestName

Display Name for the unit test.


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