1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-12 15:57:12 +01:00
SqMod/vendor/POCO/CppUnit/include/CppUnit/TextTestResult.h
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

58 lines
1.2 KiB
C++

//
// TextTestResult.h
//
#ifndef CppUnit_TextTestResult_INCLUDED
#define CppUnit_TextTestResult_INCLUDED
#include "CppUnit/CppUnit.h"
#include "CppUnit/TestResult.h"
#include <set>
#include <ostream>
namespace CppUnit {
class CppUnit_API TextTestResult: public TestResult
{
public:
TextTestResult();
TextTestResult(const std::string& ignore);
TextTestResult(std::ostream& ostr);
TextTestResult(std::ostream& ostr, const std::string& ignore);
virtual void addError(Test* test, CppUnitException* e);
virtual void addFailure(Test* test, CppUnitException* e);
virtual void startTest(Test* test);
virtual void print(std::ostream& stream);
virtual void printErrors(std::ostream& stream);
virtual void printFailures(std::ostream& stream);
virtual void printHeader(std::ostream& stream);
protected:
std::string shortName(const std::string& testName);
void setup();
void ignoring(const std::string ignore);
private:
std::ostream& _ostr;
std::set<std::string> _ignored;
};
/* insertion operator for easy output */
inline std::ostream& operator<< (std::ostream& stream, TextTestResult& result)
{
result.print(stream);
return stream;
}
} // namespace CppUnit
#endif // CppUnit_TextTestResult_INCLUDED