28 lines
531 B
C++
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;
|
|
};
|