OpenSimMirror/libraries/ode-0.9/tests/CppTestHarness/TestResults.cpp

31 lines
539 B
C++
Raw Normal View History

2007-10-19 05:24:38 +00:00
#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;
}
}