My Project
Public Member Functions | List of all members
bsl::ut_scenario Class Referencefinal

Defines a unit test scenario. A scenario defines a user story, describing the "scenario" being tested. A scenario should be paired with ut_given, ut_when and ut_then to define the scenario in english. More...

#include <ut.hpp>

Public Member Functions

constexpr ut_scenario (string_view const &name) noexcept
 Constructs a scenario. More...
 
template<typename FUNC >
constexpr ut_scenariooperator= (FUNC &&func) noexcept
 Executes a lambda function as the body of the scenario. More...
 

Detailed Description

Defines a unit test scenario. A scenario defines a user story, describing the "scenario" being tested. A scenario should be paired with ut_given, ut_when and ut_then to define the scenario in english.

Constructor & Destructor Documentation

◆ ut_scenario()

constexpr bsl::ut_scenario::ut_scenario ( string_view const &  name)
inlineexplicitnoexcept

Constructs a scenario.

Parameters
namethe name of the scenario (i.e., test case)

Member Function Documentation

◆ operator=()

template<typename FUNC >
constexpr ut_scenario& bsl::ut_scenario::operator= ( FUNC &&  func)
inlinenoexcept

Executes a lambda function as the body of the scenario.

Template Parameters
FUNCthe type of lambda being executed
Parameters
functhe lambda being executed
Returns
Returns a reference to the scenario.

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