Mercurial > fife-parpg
comparison ext/UnitTest++/src/DeferredTestReporter.cpp @ 37:0d325e9d5953
added unittest++ files into ext. Not hooked into build scripts yet
author | jasoka@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 12 Jul 2008 12:00:57 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
36:6f1227f4932b | 37:0d325e9d5953 |
---|---|
1 #include "DeferredTestReporter.h" | |
2 #include "TestDetails.h" | |
3 | |
4 using namespace UnitTest; | |
5 | |
6 void DeferredTestReporter::ReportTestStart(TestDetails const& details) | |
7 { | |
8 m_results.push_back(DeferredTestResult(details.suiteName, details.testName)); | |
9 } | |
10 | |
11 void DeferredTestReporter::ReportFailure(TestDetails const& details, char const* failure) | |
12 { | |
13 DeferredTestResult& r = m_results.back(); | |
14 r.failed = true; | |
15 r.failures.push_back(DeferredTestResult::Failure(details.lineNumber, failure)); | |
16 r.failureFile = details.filename; | |
17 } | |
18 | |
19 void DeferredTestReporter::ReportTestFinish(TestDetails const&, float const secondsElapsed) | |
20 { | |
21 DeferredTestResult& r = m_results.back(); | |
22 r.timeElapsed = secondsElapsed; | |
23 } | |
24 | |
25 DeferredTestReporter::DeferredTestResultList& DeferredTestReporter::GetResults() | |
26 { | |
27 return m_results; | |
28 } |