Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cUnitTestRegisterT< T > Class Template Reference

#include <cUnitTest.h>

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

Public Member Functions

 cUnitTestRegisterT (const LOGCHAR_t *pszTestName, UNITTEST_LEVEL_TYPE nTestLevel=UNITTEST_LEVEL_Core)
 
virtual cUnitTestCreateUnitTest () override
 must implement this. More...
 
- Public Member Functions inherited from Gray::cUnitTestRegister
void RunUnitTest ()
 Create and run the unit test cUnitTest. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gray::cSingletonStatic< cUnitTestRegisterT< cUnitTest > >
static bool isSingleCreated () noexcept
 
static cUnitTestRegisterT< cUnitTest > * get_SingleU () noexcept
 
static cUnitTestRegisterT< cUnitTest > * get_Single ()
 
static TYPE2 *__stdcall get_SingleCast ()
 
static cUnitTestRegisterT< cUnitTest > & I () noexcept
 
- Public Attributes inherited from Gray::cUnitTestRegister
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 inherited from Gray::cUnitTestRegister
 cUnitTestRegister (const LOGCHAR_t *pszTestName, UNITTEST_LEVEL_TYPE nTestLevel=UNITTEST_LEVEL_Core)
 
virtual ~cUnitTestRegister ()
 
- Protected Member Functions inherited from Gray::cSingletonStatic< cUnitTestRegisterT< cUnitTest > >
 cSingletonStatic (cUnitTestRegisterT< cUnitTest > *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< cUnitTestRegisterT< cUnitTest > >
static cUnitTestRegisterT< cUnitTest > * sm_pThe
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

template<class T = cUnitTest>
class Gray::cUnitTestRegisterT< T >

a singleton to register a unit test for a specific type of thing. Allow creation of its cUnitTest based implementation class. ALWAYS constructed in 'C' static init code. cSingletonStatic< cUnitTestRegisterT<T> > Assume static init is NOT multi threaded so no thread locking is required.

Constructor & Destructor Documentation

◆ cUnitTestRegisterT()

template<class T = cUnitTest>
Gray::cUnitTestRegisterT< T >::cUnitTestRegisterT ( const LOGCHAR_t pszTestName,
UNITTEST_LEVEL_TYPE  nTestLevel = UNITTEST_LEVEL_Core 
)
inline

Member Function Documentation

◆ CreateUnitTest()

template<class T = cUnitTest>
virtual cUnitTest* Gray::cUnitTestRegisterT< T >::CreateUnitTest ( )
inlineoverridevirtual

must implement this.

create derived version of cUnitTest Never create pure virtual cUnitTest directly of course.

Implements Gray::cUnitTestRegister.


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