root/library/tests/unittest-cpp/DeferredTestReporter.cpp @ 434

Revision 418, 0.8 kB (checked in by vbarta, 15 years ago)

#27: added UnitTest?++ to bdm sources, changed test_user_data to use it

Line 
1#include "DeferredTestReporter.h"
2#include "TestDetails.h"
3
4using namespace UnitTest;
5
6void DeferredTestReporter::ReportTestStart(TestDetails const& details)
7{
8    m_results.push_back(DeferredTestResult(details.suiteName, details.testName));
9}
10
11void 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
19void DeferredTestReporter::ReportTestFinish(TestDetails const&, float secondsElapsed)
20{
21    DeferredTestResult& r = m_results.back();
22    r.timeElapsed = secondsElapsed;
23}
24
25DeferredTestReporter::DeferredTestResultList& DeferredTestReporter::GetResults()
26{
27    return m_results;
28}
Note: See TracBrowser for help on using the browser.