?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. #include "Config.h"
  2. #ifndef UNITTEST_NO_DEFERRED_REPORTER
  3.  
  4. #include "DeferredTestReporter.h"
  5. #include "TestDetails.h"
  6.  
  7. using namespace UnitTest;
  8.  
  9. void DeferredTestReporter::ReportTestStart(TestDetails const& details)
  10. {
  11.    m_results.push_back(DeferredTestResult(details.suiteName, details.testName));
  12. }
  13.  
  14. void DeferredTestReporter::ReportFailure(TestDetails const& details, char const* failure)
  15. {
  16.    DeferredTestResult& r = m_results.back();
  17.    r.failed = true;
  18.    r.failures.push_back(DeferredTestFailure(details.lineNumber, failure));
  19.    r.failureFile = details.filename;
  20. }
  21.  
  22. void DeferredTestReporter::ReportTestFinish(TestDetails const&, float secondsElapsed)
  23. {
  24.    DeferredTestResult& r = m_results.back();
  25.    r.timeElapsed = secondsElapsed;
  26. }
  27.  
  28. DeferredTestReporter::DeferredTestResultList& DeferredTestReporter::GetResults()
  29. {
  30.    return m_results;
  31. }
  32.  
  33. #endif
  34.