ldas-tools-al 2.6.7
Loading...
Searching...
No Matches
LDASTools::Testing::UnitTestTS Class Reference

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

#include <UnitTestTS.h>

Collaboration diagram for LDASTools::Testing::UnitTestTS:

Public Member Functions

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

Private Attributes

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

Detailed Description

Provide standard routines for unit testing of code.

Constructor & Destructor Documentation

◆ UnitTestTS() [1/2]

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

Constructor.

◆ ~UnitTestTS() [1/2]

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

Destructor.

◆ UnitTestTS() [2/2]

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

Constructor.

◆ ~UnitTestTS() [2/2]

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

Destructor.

Member Function Documentation

◆ Check() [1/4]

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

Check for error conditions.

◆ Check() [2/4]

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

Check for error conditions.

◆ Check() [3/4]

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

Check for error conditions.

◆ Check() [4/4]

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

Check for error conditions.

◆ Exit() [1/2]

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

Exit with the appropriate exit code.

◆ Exit() [2/2]

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

Exit with the appropriate exit code.

◆ Init() [1/2]

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

Initialize the class with command line arguments.

◆ Init() [2/2]

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

Initialize the class with command line arguments.

◆ IsVerbose() [1/2]

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

Check if in verbose mode.

◆ IsVerbose() [2/2]

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

Check if in verbose mode.

◆ Lock() [1/2]

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

◆ Lock() [2/2]

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

◆ Message() [1/4]

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

Output info message.

◆ Message() [2/4]

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

Output info message.

◆ Message() [3/4]

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

Output info message.

◆ Message() [4/4]

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

Output info message.

◆ UnLock() [1/2]

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

◆ UnLock() [2/2]

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 files:
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/build/include/ldastoolsal/UnitTestTS.h
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/src/UnitTestTS.h