scenario.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef CRUCIBLE_TEST_SCENARIO_HPP #define CRUCIBLE_TEST_SCENARIO_HPP #include "crucible/test/outcome.hpp" #include <functional> #include <string> namespace crucible::test::scenario { using ScenarioFunction = std::function<void()>; class Scenario final { public: Scenario(std::string const &group, std::string const &name, ScenarioFunction const &function); [[nodiscard]] auto get_group() const -> std::string; [[nodiscard]] auto get_name() const -> std::string; [[nodiscard]] auto execute() const -> outcome::Outcome; private: std::string my_group {}; std::string my_name {}; ScenarioFunction my_function {}; }; } #endif // CRUCIBLE_TEST_SCENARIO_HPP