diff options
Diffstat (limited to 'libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp')
-rw-r--r-- | libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp b/libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp deleted file mode 100644 index 51db141..0000000 --- a/libraries/ode-0.9/tests/CppTestHarness/TestRunner.cpp +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #include "TestRunner.h" | ||
2 | #include "TestLauncher.h" | ||
3 | #include "TestResults.h" | ||
4 | #include "Test.h" | ||
5 | |||
6 | #include "PrintfTestReporter.h" | ||
7 | |||
8 | namespace CppTestHarness | ||
9 | { | ||
10 | |||
11 | TestRunner::TestRunner() | ||
12 | : m_testLauncherListHead(TestLauncher::GetHeadAddr()) | ||
13 | , m_testReporter(&m_defaultTestReporter) | ||
14 | { | ||
15 | } | ||
16 | |||
17 | TestRunner::~TestRunner() | ||
18 | { | ||
19 | } | ||
20 | |||
21 | void TestRunner::SetTestLauncherListHead(TestLauncher** listHead) | ||
22 | { | ||
23 | m_testLauncherListHead = listHead; | ||
24 | } | ||
25 | |||
26 | void TestRunner::SetTestReporter(TestReporter* testReporter) | ||
27 | { | ||
28 | m_testReporter = testReporter; | ||
29 | } | ||
30 | |||
31 | int TestRunner::RunAllTests() | ||
32 | { | ||
33 | int failureCount = 0; | ||
34 | |||
35 | int testCount = 0; | ||
36 | TestLauncher const* curLauncher = *m_testLauncherListHead; | ||
37 | while (curLauncher) | ||
38 | { | ||
39 | ++testCount; | ||
40 | |||
41 | TestResults result(*m_testReporter); | ||
42 | curLauncher->Launch(result); | ||
43 | |||
44 | if (result.Failed()) | ||
45 | ++failureCount; | ||
46 | |||
47 | curLauncher = curLauncher->GetNext(); | ||
48 | } | ||
49 | |||
50 | m_testReporter->ReportSummary(testCount, failureCount); | ||
51 | |||
52 | return failureCount; | ||
53 | } | ||
54 | |||
55 | } | ||
56 | |||