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>
|
constexpr | ut_scenario (string_view const &name) noexcept |
| Constructs a scenario. More...
|
|
template<typename FUNC > |
constexpr ut_scenario & | operator= (FUNC &&func) noexcept |
| Executes a lambda function as the body of the scenario. More...
|
|
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.
◆ ut_scenario()
constexpr bsl::ut_scenario::ut_scenario |
( |
string_view const & |
name | ) |
|
|
inlineexplicitnoexcept |
Constructs a scenario.
- Parameters
-
name | the name of the scenario (i.e., test case) |
◆ 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
-
FUNC | the type of lambda being executed |
- Parameters
-
func | the lambda being executed |
- Returns
- Returns a reference to the scenario.
The documentation for this class was generated from the following file: