stuff-from-scratch/test/test_utils/TestCaseRunner.h
2022-11-30 18:28:50 +00:00

28 lines
531 B
C++

#pragma once
#include "TestCase.h"
#include <vector>
#include <string>
class TestCaseRunner
{
public:
TestCaseRunner();
static TestCaseRunner& getInstance();
~TestCaseRunner();
void addTestCase(const std::string& label, const std::string& tag, TestCase::TestCaseFunction func);
void markTestFailure(const std::string& line);
bool run();
private:
std::vector<std::string> mFailingTests;
static bool sLastTestFailed;
static std::string sFailureLine;
std::vector<TestCase*> mCases;
};