c-resources/CPlusPlus20ForProgrammers-m.../examples/libraries/concurrencpp/test/include/infra/tester.h

36 lines
750 B
C
Raw Normal View History

2024-04-09 06:45:18 +00:00
#ifndef CONCURRENCPP_TESTER_H
#define CONCURRENCPP_TESTER_H
#include <deque>
#include <functional>
namespace concurrencpp::tests {
class test_step {
private:
const char* m_step_name;
std::function<void()> m_step;
public:
test_step(const char* step_name, std::function<void()> callable);
void launch_test_step() noexcept;
};
class tester {
private:
const char* m_test_name;
std::deque<test_step> m_steps;
public:
tester(const char* test_name) noexcept;
void launch_test() noexcept;
void add_step(const char* step_name, std::function<void()> callable);
};
} // namespace concurrencpp::tests
#endif // CONCURRENCPP_TESTER_H