stuff-from-scratch/test/test_utils/TestCaseRunner.h

28 lines
451 B
C
Raw Normal View History

2021-05-23 20:02:38 +00:00
#pragma once
#include "TestCase.h"
#include <vector>
2021-09-26 20:42:35 +00:00
#include <string>
2021-05-23 20:02:38 +00:00
class TestCaseRunner
{
public:
2022-11-29 18:00:19 +00:00
TestCaseRunner() = default;
2021-05-23 20:02:38 +00:00
2022-11-29 18:00:19 +00:00
static TestCaseRunner& getInstance()
{
static TestCaseRunner instance;
return instance;
}
2021-05-23 20:02:38 +00:00
2022-11-29 18:00:19 +00:00
~TestCaseRunner();
void addTestCase(const std::string& label, const std::string& tag, TestCase::TestCaseFunction func);
bool run();
2021-05-23 20:02:38 +00:00
private:
2022-11-29 18:00:19 +00:00
std::vector<TestCase*> mCases;
2021-05-23 20:02:38 +00:00
};