C++Spec 1.0.0
BDD testing for C++
|
Base class for all objects in the execution tree. More...
#include <runnable.hpp>
Public Member Functions | |
Runnable (std::source_location location) | |
bool | has_parent () noexcept |
Check to see if the Runnable has a parent. | |
bool | has_parent () const noexcept |
Runnable * | get_parent () noexcept |
Get the Runnable's parent. | |
const Runnable * | get_parent () const noexcept |
std::list< std::shared_ptr< Runnable > > & | get_children () noexcept |
const std::list< std::shared_ptr< Runnable > > & | get_children () const noexcept |
template<class C> | |
C * | get_parent_as () noexcept |
template<class C> | |
const C * | get_parent_as () const noexcept |
template<typename T, typename... Args> | |
T * | make_child (Args &&... args) |
std::string | padding () const noexcept |
Generate padding (indentation) fore the current object. | |
std::source_location | get_location () const noexcept |
void | set_location (std::source_location location) noexcept |
virtual void | run ()=0 |
virtual void | timed_run () |
std::chrono::duration< double > | get_runtime () const |
std::chrono::time_point< std::chrono::system_clock > | get_start_time () const |
virtual Result | get_result () const |
size_t | num_tests () const noexcept |
size_t | num_failures () const noexcept |
Base class for all objects in the execution tree.
A base class for all objects that comprise some abstract structure with a nesting concept. Used to propogate ('pass') failures from leaf to root without exceptions (and/or code-jumping), thus allowing execution to continue virtually uninterrupted.
|
inlinenodiscardnoexcept |
Generate padding (indentation) fore the current object.