1
#include "TestResults.h"
2
#include "TestReporter.h"
4
#include "TestDetails.h"
8
TestResults::TestResults(TestReporter* testReporter)
9
: m_testReporter(testReporter)
11
, m_failedTestCount(0)
13
, m_currentTestFailed(false)
17
void TestResults::OnTestStart(TestDetails const& test)
20
m_currentTestFailed = false;
22
m_testReporter->ReportTestStart(test);
25
void TestResults::OnTestFailure(TestDetails const& test, char const* failure)
28
if (!m_currentTestFailed)
31
m_currentTestFailed = true;
35
m_testReporter->ReportFailure(test, failure);
38
void TestResults::OnTestFinish(TestDetails const& test, float secondsElapsed)
41
m_testReporter->ReportTestFinish(test, secondsElapsed);
44
int TestResults::GetTotalTestCount() const
46
return m_totalTestCount;
49
int TestResults::GetFailedTestCount() const
51
return m_failedTestCount;
54
int TestResults::GetFailureCount() const
56
return m_failureCount;