forked from EbenZhang/kcppunitlite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestregistry.h
More file actions
47 lines (33 loc) · 1.2 KB
/
Copy pathtestregistry.h
File metadata and controls
47 lines (33 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef TESTREGISTRY_H
#define TESTREGISTRY_H
// TestRegistry is a primitive singleton which collects all of the
// tests in a system and allows them to be executed. To see how
// tests are added to the TestRegistry look at the Test.h file
#include <vector>
class TestCreator;
class TestResult;
class TestRegistry
{
public:
static void addFastTest (TestCreator *pTest);
static void addSlowTest(TestCreator* pTest);
static void addOnlyTest(TestCreator* pTest);
static void runAllTests (TestResult& result);
static void runFastTests (TestResult& result);
static void runSlowTests (TestResult& result);
private:
TestRegistry();
static TestRegistry& instance ();
void DoAddFastTest (TestCreator *pTest);
void DoAddSlowTest(TestCreator *pTest);
void DoAddOnlyTest(TestCreator* pTest);
void DoRunFastTest (TestResult& result);
void DoRunSlowTest (TestResult& result);
void DoRunTestOnly(TestResult& result);
bool IsUsingTestOnly()const;
std::vector<TestCreator *> m_fastTests;
std::vector<TestCreator *> m_slowTests;
TestCreator* m_pOnlyTest;
};
#endif
//END OF FILE