Play-/tools/AutoTest/TestReportWriter.h

34 lines
556 B
C
Raw Permalink Normal View History

2015-05-04 03:04:36 -04:00
#pragma once
#include "filesystem_def.h"
2015-05-04 03:04:36 -04:00
#include <string>
#include <memory>
#include <vector>
2015-05-04 03:04:36 -04:00
struct LINEDIFF
{
std::string expected;
std::string result;
};
struct TESTRESULT
{
typedef std::vector<LINEDIFF> LineDiffArray;
bool succeeded = false;
LineDiffArray lineDiffs;
};
2015-05-04 03:04:36 -04:00
class CTestReportWriter
{
public:
2018-04-30 21:01:23 +01:00
virtual ~CTestReportWriter()
{
}
virtual void ReportTestEntry(const std::string& name, const TESTRESULT&) = 0;
virtual void Write(const fs::path& reportPath) = 0;
2015-05-04 03:04:36 -04:00
};
typedef std::shared_ptr<CTestReportWriter> TestReportWriterPtr;