structure describing the result of a test or a test suite
More...
#include </home/runner/work/tfel/tfel/include/TFEL/Tests/TestResult.hxx>
|
|
using | const_iterator = std::vector<TestResult>::const_iterator |
| | a simple alias
|
|
|
| TestResult () |
| | default onstructor
|
| | TestResult (const bool) |
| | constructor
|
| | TestResult (const bool, const std::string_view, const std::string_view=std::string_view{}) |
| | constructor
|
|
| TestResult (const TestResult &) |
| | copy constructor
|
|
| TestResult (TestResult &&) noexcept |
| | copy constructor
|
|
TestResult & | operator= (TestResult &&) noexcept |
| | assignement operator
|
|
TestResult & | operator= (const TestResult &) |
| | assignement operator
|
|
bool | success () const |
| | report success
|
| const std::string & | getDescription () const |
| const std::string & | getFailureDescription () const |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | append (const TestResult &) |
| | This is a typical stack operation. The function creates an element at the end of the vector and assigns the given data to it. Due to the nature of a vector this operation can be done in constant time if the vector has preallocated space available.
|
| void | setTestDuration (const double) |
| | set test duration
|
| double | duration () const |
|
| ~TestResult () |
| | destructor
|
structure describing the result of a test or a test suite
◆ TestResult() [1/2]
| tfel::tests::TestResult::TestResult |
( |
const bool | | ) |
|
|
explicit |
constructor
- Parameters
-
| [in] | b | tells if the test is a success |
◆ TestResult() [2/2]
| tfel::tests::TestResult::TestResult |
( |
const bool | , |
|
|
const std::string_view | , |
|
|
const std::string_view | = std::string_view{} ) |
constructor
- Parameters
-
| [in] | b | tells if the test is a success |
| [in] | c | description of the test |
| [in] | e | description of why the test failed |
◆ append()
This is a typical stack operation. The function creates an element at the end of the vector and assigns the given data to it. Due to the nature of a vector this operation can be done in constant time if the vector has preallocated space available.
- Parameters
-
| [in] | r | : result to be appended |
◆ begin()
- Returns
- a read-only (constant) iterator that points to the first element in the vector.
◆ duration()
| double tfel::tests::TestResult::duration |
( |
| ) |
const |
|
nodiscard |
◆ end()
- Returns
- an iterator that points one past the last element in the vector
◆ getDescription()
| const std::string & tfel::tests::TestResult::getDescription |
( |
| ) |
const |
|
nodiscard |
- Returns
- a description of the test
◆ getFailureDescription()
| const std::string & tfel::tests::TestResult::getFailureDescription |
( |
| ) |
const |
|
nodiscard |
- Returns
- a description of why the test fails
◆ setTestDuration()
| void tfel::tests::TestResult::setTestDuration |
( |
const double | | ) |
|
set test duration
- Parameters
-
The documentation for this struct was generated from the following file: