tfel
Loading...
Searching...
No Matches
tfel::tests::TestManager Struct Reference

a singleton in charge of managing a collection of tests. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Tests/TestManager.hxx>

Public Types

using TestOutputPtr = std::shared_ptr<TestOutput>
 a simple alias
using TestPtr = std::shared_ptr<Test>
 a simple alias

Public Member Functions

 TestManager (TestManager &&)=delete
 move constructor (disabled)
 TestManager (const TestManager &)=delete
 copy constructor (disabled)
TestManager & operator= (TestManager &&)=delete
 move assignement operator (disabled)
TestManager & operator= (const TestManager &)=delete
 assignement operator (disabled)
void addTestOutput (TestOutputPtr)
 add a test output
void addTestOutput (std::ostream &, const bool=true)
 add a test output
void addTestOutput (const std::string &)
 add a test output to the specified file
void addXMLTestOutput (const std::string &)
 add a test output to the specified file
void addTestOutput (const std::string &, TestOutputPtr)
 add a test output to the specified test suite
void addTestOutput (const std::string &, std::ostream &, const bool=true)
 add a test output to the specified test suite
void addTestOutput (const std::string &, const std::string &)
void addTest (const std::string &, TestPtr)
void registerTestConstructionFailure (const std::string &, std::string_view) noexcept
 method indicating that the construction of a test failed for the given reason
void registerTestConstructionFailure (const std::string &) noexcept
 method indicating that the construction of a test failed for an unknown reason
TestResult execute ()
 execute registred tests

Static Public Member Functions

static TestManager & getTestManager ()

Detailed Description

a singleton in charge of managing a collection of tests.

Member Function Documentation

◆ addTest()

void tfel::tests::TestManager::addTest ( const std::string & ,
TestPtr  )

add a test to the specified test suite

Parameters
[in]ggroup of the test
ttest to be added

◆ addTestOutput() [1/6]

void tfel::tests::TestManager::addTestOutput ( const std::string & )

add a test output to the specified file

Parameters
[in]ffile name

◆ addTestOutput() [2/6]

void tfel::tests::TestManager::addTestOutput ( const std::string & ,
const std::string &  )

add a test output to the specified file

Parameters
[in]nname of the test suite
[in]ffile name

◆ addTestOutput() [3/6]

void tfel::tests::TestManager::addTestOutput ( const std::string & ,
std::ostream & ,
const bool = true )

add a test output to the specified test suite

Parameters
[in]nname of the test suite
[in]ooutput to be added
[in]bcolourised output

◆ addTestOutput() [4/6]

void tfel::tests::TestManager::addTestOutput ( const std::string & ,
TestOutputPtr  )

add a test output to the specified test suite

Parameters
nname of the test suite
ooutput to be added

◆ addTestOutput() [5/6]

void tfel::tests::TestManager::addTestOutput ( std::ostream & ,
const bool = true )

add a test output

Parameters
ooutput to be added
[in]bcolourised output

◆ addTestOutput() [6/6]

void tfel::tests::TestManager::addTestOutput ( TestOutputPtr )

add a test output

Parameters
ooutput to be added

◆ addXMLTestOutput()

void tfel::tests::TestManager::addXMLTestOutput ( const std::string & )

add a test output to the specified file

Parameters
ffile name

◆ execute()

TestResult tfel::tests::TestManager::execute ( )
nodiscard

execute registred tests

Returns
the results of all tests

◆ getTestManager()

TestManager & tfel::tests::TestManager::getTestManager ( )
static
Returns
the unique instance of the class

◆ registerTestConstructionFailure() [1/2]

void tfel::tests::TestManager::registerTestConstructionFailure ( const std::string & )
noexcept

method indicating that the construction of a test failed for an unknown reason

Parameters
[in]nname of the test

◆ registerTestConstructionFailure() [2/2]

void tfel::tests::TestManager::registerTestConstructionFailure ( const std::string & ,
std::string_view  )
noexcept

method indicating that the construction of a test failed for the given reason

Parameters
[in]nname of the test
[in]msgerror message

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