Class Index Cross Index Namespace Index

Class General::UnitTest

Provide standard routines for unit testing of code.
Contained in: General
Derived from: none
Derived by: none

#include "general/unittest.h"


public function member index:

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
 

Description:



Function Member Descriptions:


General::UnitTest::UnitTest - Constructor


UnitTest(void);



General::UnitTest::~UnitTest - Destructor


~UnitTest(void);



General::UnitTest::Check - Check for error conditions


std::ostream& Check(bool TestResult);



General::UnitTest::Check - Check for error conditions


void Check(bool TestResult, std::string Message);



General::UnitTest::Exit - Exit with the appropriate exit code


void Exit(void);



General::UnitTest::Init - Initialize the class with command line arguments


void Init(int ArgC, char** ArgV);



General::UnitTest::IsVerbose - Check if in verbose mode


bool IsVerbose(int Level = 0) const;



General::UnitTest::Message - Output info message


std::ostream& Message(bool Leader = true) const;



General::UnitTest::Message - Output info message


std::ostream& Message(int Level, bool Leader = true) const;



Variable Member Descriptions:


General::UnitTest::m_null_stream - Pointer to stream when in non-verbose mode

std::ostream* m_null_stream;

General::UnitTest::m_status - Failure status flag

bool m_status;

General::UnitTest::m_verbose - Level of verbosity

int m_verbose;