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 ()
 
virtual bool run ()=0
 Test behavior. More...
 
void operator() (std::ostream &out=std::cout, bool color=true)
 Another way to call test function. More...
 
void 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()

virtual bool HeliosTests::BaseTest::run ( )
pure virtual

Test behavior.

At the end it must report test status.

Only tests implementing a run method will be runnable

Returns
If test finished with successful status true must be returned. Otherwise false will be returned.

Implemented in HeliosTests::LadLutTest, HeliosTests::VoxelParsingTest, HeliosTests::PlatformPhysicsTest, HeliosTests::RandomTest, HeliosTests::ScenePartSplitTest, HeliosTests::SerializationTest, HeliosTests::SurveyCopyTest, HeliosTests::NoiseTest, HeliosTests::RayIntersectionTest, and HeliosTests::PlaneFitterTest.

◆ test()

void 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

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