34 lines
831 B
C++
34 lines
831 B
C++
#pragma once
|
|
#include <Void/Testing/Config.hpp>
|
|
#include <Void/Testing/Reporter.hpp>
|
|
#include <memory>
|
|
|
|
namespace Void::Testing
|
|
{
|
|
class Runner
|
|
{
|
|
public:
|
|
|
|
static Runner& instance()
|
|
{
|
|
static Runner r;
|
|
return r;
|
|
}
|
|
RunConfig parse_args(int argc, char** argv);
|
|
RunResult run(const RunConfig& config);
|
|
TestResult execute_case(TestCase& test_case);
|
|
int main(int argc, char** argv);
|
|
|
|
private:
|
|
|
|
Runner() = default;
|
|
std::vector<TestCase>
|
|
filter_tests(const std::vector<TestCase>& tests,
|
|
const RunConfig& config);
|
|
std::unique_ptr<Reporter> create_reporter(const RunConfig& config);
|
|
TestResult execute_test(TestCase& test_case);
|
|
TestResult execute_test_parallel(TestCase& test_case);
|
|
void run_test_body(TestCase& test_case, TestResult& result);
|
|
};
|
|
} // namespace Void::Testing
|