You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
793 B
36 lines
793 B
#ifndef TEST_SUITE_H |
|
#define TEST_SUITE_H |
|
|
|
#include <cstdio> // FILE |
|
#include <vector> |
|
|
|
#include "ruc/singleton.h" |
|
#include "testcase.h" |
|
|
|
namespace test { |
|
|
|
class TestSuite final : public ruc::Singleton<TestSuite> { |
|
public: |
|
TestSuite(s); |
|
virtual ~TestSuite(); |
|
|
|
void run(); |
|
void addCase(const TestCase& testCase) { m_cases.push_back(testCase); } |
|
void currentTestCaseFailed() { m_currentTestCasePassed = false; } |
|
|
|
FILE* outputStd() const { return m_outputStd; } |
|
FILE* outputErr() const { return m_outputErr; } |
|
FILE* outputNull() const { return m_outputNull; } |
|
|
|
private: |
|
bool m_currentTestCasePassed { true }; |
|
FILE* m_outputStd { nullptr }; |
|
FILE* m_outputErr { nullptr }; |
|
FILE* m_outputNull { nullptr }; |
|
|
|
std::vector<TestCase> m_cases; |
|
}; |
|
|
|
} // namespace test |
|
|
|
#endif // TEST_SUITE_H
|
|
|