blob: f2d2f813ca0376a58269312e95622649dcd4f544 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "TestResults.h"
#include "TestReporter.h"
namespace CppTestHarness
{
TestResults::TestResults(TestReporter& testReporter)
: m_failure(false)
, m_testReporter(testReporter)
{
}
void TestResults::ReportFailure(char const* file, int const line, std::string const failure)
{
m_failure = true;
m_testReporter.ReportFailure(file, line, failure);
}
void TestResults::ReportDone(const std::string& testName)
{
m_testReporter.ReportSingleResult(testName, m_failure);
}
bool TestResults::Failed() const
{
return m_failure;
}
}
|