Helios++
Helios software for LiDAR simulations
HeliosTests::BaseTest Class Referenceabstract

BaseTest class. More...

#include <BaseTest.h>

Inheritance diagram for HeliosTests::BaseTest:

Public Member Functions

 BaseTest (std::string const &name)
 Base test constructor. More...
 
std::string getName ()
 Obtain the test name. More...
 
virtual bool run ()=0
 Test behavior. More...
 
void operator() (std::ostream &out=std::cout, bool color=true)
 Another way to call test function. More...
 
bool test (std::ostream &out=std::cout, bool color=true)
 Perform the test and output its final status. More...
 

Protected Attributes

std::string const name
 The name for the test.
 

Detailed Description

BaseTest class.

Author
Alberto M. Esmoris Pena
Version
1.0

Can be overridden to implement new tests.

NOTICE in order for a test to be runnable it must override the run method to implement the test behavior.

Constructor & Destructor Documentation

◆ BaseTest()

HeliosTests::BaseTest::BaseTest ( std::string const &  name)
inline

Base test constructor.

Parameters
nameName for the test

Member Function Documentation

◆ getName()

std::string HeliosTests::BaseTest::getName ( )
inline

Obtain the test name.

Returns
Test name

◆ operator()()

void HeliosTests::BaseTest::operator() ( std::ostream &  out = std::cout,
bool  color = true 
)
inline

Another way to call test function.

See also
HeliosTests::BaseTest::test()

◆ run()

◆ test()

bool HeliosTests::BaseTest::test ( std::ostream &  out = std::cout,
bool  color = true 
)

Perform the test and output its final status.

Parameters
outOutput stream used to output test final status
colorTrue to enable coloring when reporting test status. False otherwise
Returns
True if the test was successfully passed, false otherwise

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