ldas-tools-al  2.6.4
Public Member Functions | Private Attributes | List of all members
LDASTools::Testing::UnitTestTS Class Reference

Provide standard routines for unit testing of code. More...

#include <UnitTestTS.h>

Collaboration diagram for LDASTools::Testing::UnitTestTS:
Collaboration graph
[legend]

Public Member Functions

 UnitTestTS (void)
 Constructor. More...
 
 ~UnitTestTS (void)
 Destructor. More...
 
std::ostream & Check (bool TestResult)
 Check for error conditions. More...
 
void Check (bool TestResult, std::string Message)
 Check for error conditions. More...
 
void Exit (void)
 Exit with the appropriate exit code. More...
 
void Init (int ArgC, char **ArgV)
 Initialize the class with command line arguments. More...
 
bool IsVerbose (int Level=0) const
 Check if in verbose mode. More...
 
void Lock ()
 
std::ostream & Message (bool Leader=true) const
 Output info message. More...
 
std::ostream & Message (int Level, bool Leader=true) const
 Output info message. More...
 
void UnLock ()
 
 UnitTestTS (void)
 Constructor. More...
 
 ~UnitTestTS (void)
 Destructor. More...
 
std::ostream & Check (bool TestResult)
 Check for error conditions. More...
 
void Check (bool TestResult, std::string Message)
 Check for error conditions. More...
 
void Exit (void)
 Exit with the appropriate exit code. More...
 
void Init (int ArgC, char **ArgV)
 Initialize the class with command line arguments. More...
 
bool IsVerbose (int Level=0) const
 Check if in verbose mode. More...
 
void Lock ()
 
std::ostream & Message (bool Leader=true) const
 Output info message. More...
 
std::ostream & Message (int Level, bool Leader=true) const
 Output info message. More...
 
void UnLock ()
 
 UnitTestTS (void)
 Constructor. More...
 
 ~UnitTestTS (void)
 Destructor. More...
 
std::ostream & Check (bool TestResult)
 Check for error conditions. More...
 
void Check (bool TestResult, std::string Message)
 Check for error conditions. More...
 
void Exit (void)
 Exit with the appropriate exit code. More...
 
void Init (int ArgC, char **ArgV)
 Initialize the class with command line arguments. More...
 
bool IsVerbose (int Level=0) const
 Check if in verbose mode. More...
 
void Lock ()
 
std::ostream & Message (bool Leader=true) const
 Output info message. More...
 
std::ostream & Message (int Level, bool Leader=true) const
 Output info message. More...
 
void UnLock ()
 

Private Attributes

int m_verbose
 Level of verbosity. More...
 
bool m_status
 Failure status flag. More...
 
std::ostringstream m_null_stream
 Pointer to stream when in non-verbose mode. More...
 
LDASTools::AL::MutexLock::baton_type m_key
 Lock when used in a mult-threaded environment. More...
 
LDASTools::AL::MemChecker::Trigger gc_trigger
 Trigger garbage collection. More...
 

Detailed Description

Provide standard routines for unit testing of code.

Constructor & Destructor Documentation

◆ UnitTestTS() [1/3]

LDASTools::Testing::UnitTestTS::UnitTestTS ( void  )
inline

Constructor.

◆ ~UnitTestTS() [1/3]

LDASTools::Testing::UnitTestTS::~UnitTestTS ( void  )
inline

Destructor.

◆ UnitTestTS() [2/3]

LDASTools::Testing::UnitTestTS::UnitTestTS ( void  )

Constructor.

◆ ~UnitTestTS() [2/3]

LDASTools::Testing::UnitTestTS::~UnitTestTS ( void  )

Destructor.

◆ UnitTestTS() [3/3]

LDASTools::Testing::UnitTestTS::UnitTestTS ( void  )

Constructor.

◆ ~UnitTestTS() [3/3]

LDASTools::Testing::UnitTestTS::~UnitTestTS ( void  )

Destructor.

Member Function Documentation

◆ Check() [1/6]

std::ostream & LDASTools::Testing::UnitTestTS::Check ( bool  TestResult)
inline

Check for error conditions.

◆ Check() [2/6]

std::ostream& LDASTools::Testing::UnitTestTS::Check ( bool  TestResult)

Check for error conditions.

◆ Check() [3/6]

std::ostream& LDASTools::Testing::UnitTestTS::Check ( bool  TestResult)

Check for error conditions.

◆ Check() [4/6]

void LDASTools::Testing::UnitTestTS::Check ( bool  TestResult,
std::string  Message 
)
inline

Check for error conditions.

◆ Check() [5/6]

void LDASTools::Testing::UnitTestTS::Check ( bool  TestResult,
std::string  Message 
)

Check for error conditions.

◆ Check() [6/6]

void LDASTools::Testing::UnitTestTS::Check ( bool  TestResult,
std::string  Message 
)

Check for error conditions.

◆ Exit() [1/3]

void LDASTools::Testing::UnitTestTS::Exit ( void  )

Exit with the appropriate exit code.

◆ Exit() [2/3]

void LDASTools::Testing::UnitTestTS::Exit ( void  )
inline

Exit with the appropriate exit code.

◆ Exit() [3/3]

void LDASTools::Testing::UnitTestTS::Exit ( void  )

Exit with the appropriate exit code.

◆ Init() [1/3]

void LDASTools::Testing::UnitTestTS::Init ( int  ArgC,
char **  ArgV 
)
inline

Initialize the class with command line arguments.

◆ Init() [2/3]

void LDASTools::Testing::UnitTestTS::Init ( int  ArgC,
char **  ArgV 
)

Initialize the class with command line arguments.

◆ Init() [3/3]

void LDASTools::Testing::UnitTestTS::Init ( int  ArgC,
char **  ArgV 
)

Initialize the class with command line arguments.

◆ IsVerbose() [1/3]

bool LDASTools::Testing::UnitTestTS::IsVerbose ( int  Level = 0) const
inline

Check if in verbose mode.

◆ IsVerbose() [2/3]

bool LDASTools::Testing::UnitTestTS::IsVerbose ( int  Level = 0) const
inline

Check if in verbose mode.

◆ IsVerbose() [3/3]

bool LDASTools::Testing::UnitTestTS::IsVerbose ( int  Level = 0) const
inline

Check if in verbose mode.

◆ Lock() [1/3]

void LDASTools::Testing::UnitTestTS::Lock ( )

◆ Lock() [2/3]

void LDASTools::Testing::UnitTestTS::Lock ( )
inline

◆ Lock() [3/3]

void LDASTools::Testing::UnitTestTS::Lock ( )

◆ Message() [1/6]

std::ostream& LDASTools::Testing::UnitTestTS::Message ( bool  Leader = true) const

Output info message.

◆ Message() [2/6]

std::ostream& LDASTools::Testing::UnitTestTS::Message ( bool  Leader = true) const

Output info message.

◆ Message() [3/6]

std::ostream & LDASTools::Testing::UnitTestTS::Message ( bool  Leader = true) const
inline

Output info message.

◆ Message() [4/6]

std::ostream& LDASTools::Testing::UnitTestTS::Message ( int  Level,
bool  Leader = true 
) const

Output info message.

◆ Message() [5/6]

std::ostream & LDASTools::Testing::UnitTestTS::Message ( int  Level,
bool  Leader = true 
) const
inline

Output info message.

◆ Message() [6/6]

std::ostream& LDASTools::Testing::UnitTestTS::Message ( int  Level,
bool  Leader = true 
) const

Output info message.

◆ UnLock() [1/3]

void LDASTools::Testing::UnitTestTS::UnLock ( )

◆ UnLock() [2/3]

void LDASTools::Testing::UnitTestTS::UnLock ( )
inline

◆ UnLock() [3/3]

void LDASTools::Testing::UnitTestTS::UnLock ( )

Member Data Documentation

◆ gc_trigger

LDASTools::AL::MemChecker::Trigger LDASTools::Testing::UnitTestTS::gc_trigger
private

Trigger garbage collection.

◆ m_key

LDASTools::AL::MutexLock::baton_type LDASTools::Testing::UnitTestTS::m_key
private

Lock when used in a mult-threaded environment.

◆ m_null_stream

std::ostringstream LDASTools::Testing::UnitTestTS::m_null_stream
mutableprivate

Pointer to stream when in non-verbose mode.

◆ m_status

bool LDASTools::Testing::UnitTestTS::m_status
private

Failure status flag.

◆ m_verbose

int LDASTools::Testing::UnitTestTS::m_verbose
private

Level of verbosity.


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