From ee4adf600bdd3aa60cc0e92a39f2111be0a90bc6 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 27 May 2015 15:00:06 +0200 Subject: Added library for supporting unit tests (nw) --- 3rdparty/unittest-cpp/UnitTest++/XmlTestReporter.h | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 3rdparty/unittest-cpp/UnitTest++/XmlTestReporter.h (limited to '3rdparty/unittest-cpp/UnitTest++/XmlTestReporter.h') diff --git a/3rdparty/unittest-cpp/UnitTest++/XmlTestReporter.h b/3rdparty/unittest-cpp/UnitTest++/XmlTestReporter.h new file mode 100644 index 00000000000..63d424e8bbd --- /dev/null +++ b/3rdparty/unittest-cpp/UnitTest++/XmlTestReporter.h @@ -0,0 +1,38 @@ +#ifndef UNITTEST_XMLTESTREPORTER_H +#define UNITTEST_XMLTESTREPORTER_H + +#include "Config.h" +#ifndef UNITTEST_NO_DEFERRED_REPORTER + +#include "DeferredTestReporter.h" + +#include + +namespace UnitTest +{ + +class UNITTEST_LINKAGE XmlTestReporter : public DeferredTestReporter +{ +public: + explicit XmlTestReporter(std::ostream& ostream); + + virtual void ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed); + +private: + XmlTestReporter(XmlTestReporter const&); + XmlTestReporter& operator=(XmlTestReporter const&); + + void AddXmlElement(std::ostream& os, char const* encoding); + void BeginResults(std::ostream& os, int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed); + void EndResults(std::ostream& os); + void BeginTest(std::ostream& os, DeferredTestResult const& result); + void AddFailure(std::ostream& os, DeferredTestResult const& result); + void EndTest(std::ostream& os, DeferredTestResult const& result); + + std::ostream& m_ostream; +}; + +} + +#endif +#endif -- cgit v1.2.3