ldas-tools-al 2.6.4
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
LDASTools::Testing::UnitTest Class Reference

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

#include <unittest.h>

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

Public Member Functions

 UnitTest (void)
 Constructor.
 
 ~UnitTest (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.
 
std::ostream & Message (bool Leader=true) const
 Output info message.
 
std::ostream & Message (int Level, bool Leader=true) const
 Output info message.
 
int Verbosity () const
 Retrieve the verbosity level.
 
 UnitTest (void)
 Constructor.
 
 ~UnitTest (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.
 
std::ostream & Message (bool Leader=true) const
 Output info message.
 
std::ostream & Message (int Level, bool Leader=true) const
 Output info message.
 
int Verbosity () const
 Retrieve the verbosity level.
 

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::MemChecker::Trigger gc_trigger
 Trigger garbage collection.
 

Detailed Description

Provide standard routines for unit testing of code.

Constructor & Destructor Documentation

◆ UnitTest() [1/2]

LDASTools::Testing::UnitTest::UnitTest ( void )
inline

Constructor.

◆ ~UnitTest() [1/2]

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

Destructor.

◆ UnitTest() [2/2]

LDASTools::Testing::UnitTest::UnitTest ( void )

Constructor.

◆ ~UnitTest() [2/2]

LDASTools::Testing::UnitTest::~UnitTest ( void )

Destructor.

Member Function Documentation

◆ Check() [1/4]

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

Check for error conditions.

◆ Check() [2/4]

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

Check for error conditions.

◆ Check() [3/4]

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

Check for error conditions.

◆ Check() [4/4]

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

Check for error conditions.

◆ Exit() [1/2]

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

Exit with the appropriate exit code.

◆ Exit() [2/2]

void LDASTools::Testing::UnitTest::Exit ( void )

Exit with the appropriate exit code.

◆ Init() [1/2]

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

Initialize the class with command line arguments.

◆ Init() [2/2]

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

Initialize the class with command line arguments.

◆ IsVerbose() [1/2]

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

Check if in verbose mode.

◆ IsVerbose() [2/2]

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

Check if in verbose mode.

◆ Message() [1/4]

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

Output info message.

◆ Message() [2/4]

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

Output info message.

◆ Message() [3/4]

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

Output info message.

◆ Message() [4/4]

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

Output info message.

◆ Verbosity() [1/2]

int LDASTools::Testing::UnitTest::Verbosity ( ) const
inline

Retrieve the verbosity level.

◆ Verbosity() [2/2]

int LDASTools::Testing::UnitTest::Verbosity ( ) const
inline

Retrieve the verbosity level.

Member Data Documentation

◆ gc_trigger

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

Trigger garbage collection.

◆ m_null_stream

std::ostringstream LDASTools::Testing::UnitTest::m_null_stream
mutableprivate

Pointer to stream when in non-verbose mode.

◆ m_status

bool LDASTools::Testing::UnitTest::m_status
private

Failure status flag.

◆ m_verbose

int LDASTools::Testing::UnitTest::m_verbose
private

Level of verbosity.


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