actor-framework
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
caf::test::runnable Class Referenceabstract

A runnable definition of a test case or scenario. More...

#include <runnable.hpp>

Inheritance diagram for caf::test::runnable:
Inheritance graph
[legend]
Collaboration diagram for caf::test::runnable:
Collaboration graph
[legend]

Public Member Functions

 runnable (context_ptr ctx, std::string_view description, block_type root_type, const detail::source_location &loc=detail::source_location::current())
 Creates a new runnable. More...
 
template<class... Ts>
void fail (format_string_with_location fwl, Ts &&... xs)
 Generates a message with the INFO severity level.
 
template<class T0 , class T1 >
bool check_eq (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Checks whether lhs and rhs are equal.
 
template<class T0 , class T1 >
bool check_ne (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Checks whether lhs and rhs are unequal.
 
template<class T0 , class T1 >
bool check_lt (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Checks whether lhs is less than rhs.
 
template<class T0 , class T1 >
bool check_le (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Checks whether lhs less than or equal to rhs.
 
template<class T0 , class T1 >
bool check_gt (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Checks whether lhs is greater than rhs.
 
template<class T0 , class T1 >
bool check_ge (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Checks whether lhs greater than or equal to rhs.
 
bool check (bool value, const detail::source_location &location=detail::source_location::current())
 Checks whether value is true.
 
template<class T0 , class T1 >
void require_eq (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Evaluates whether lhs and rhs are equal and fails otherwise.
 
template<class T0 , class T1 >
void require_ne (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Evaluates whether lhs and rhs are unequal and fails otherwise.
 
template<class T0 , class T1 >
void require_lt (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Evaluates whether lhs is less than rhs and fails otherwise.
 
template<class T0 , class T1 >
void require_le (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Evaluates whether lhs less than or equal to rhs and fails otherwise.
 
template<class T0 , class T1 >
void require_gt (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Evaluates whether lhs is greater than rhs and fails otherwise.
 
template<class T0 , class T1 >
void require_ge (const T0 &lhs, const T1 &rhs, const detail::source_location &location=detail::source_location::current())
 Evaluates whether lhs greater than or equal to rhs and fails otherwise. More...
 
void require (bool value, const detail::source_location &location=detail::source_location::current())
 Evaluates whether value is true and fails otherwise.
 
blockcurrent_block ()
 
template<class Expr >
void should_fail (Expr &&expr, const caf::detail::source_location &location=caf::detail::source_location::current())
 
template<class... Ts>
auto block_parameters ()
 

Static Public Member Functions

static runnablecurrent ()
 Returns the runnable instance that is currently running.
 

Protected Member Functions

void call_do_run ()
 

Protected Attributes

context_ptr ctx_
 
std::string_view description_
 
block_type root_type_
 
detail::source_location loc_
 

Friends

class runnable_with_examples
 
class runner
 

Detailed Description

A runnable definition of a test case or scenario.

Constructor & Destructor Documentation

◆ runnable()

caf::test::runnable::runnable ( context_ptr  ctx,
std::string_view  description,
block_type  root_type,
const detail::source_location loc = detail::source_location::current() 
)
inline

Creates a new runnable.

Parameters
ctxThe test context.
descriptionA description of the test or scenario.
root_typeThe type of the root block.
locThe source location of the test or scenario.

Member Function Documentation

◆ require_ge()

template<class T0 , class T1 >
void caf::test::runnable::require_ge ( const T0 &  lhs,
const T1 &  rhs,
const detail::source_location location = detail::source_location::current() 
)
inline

Evaluates whether lhs greater than or equal to rhs and fails otherwise.


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