From 47e24eece15121c917a30166037cbb072bb6a443 Mon Sep 17 00:00:00 2001 From: Adam Domurad Date: Wed, 21 Nov 2012 12:37:38 -0500 Subject: Add UnitTest++ source code into ITW, without integration. --- tests/UnitTest++/src/XmlTestReporter.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/UnitTest++/src/XmlTestReporter.h (limited to 'tests/UnitTest++/src/XmlTestReporter.h') diff --git a/tests/UnitTest++/src/XmlTestReporter.h b/tests/UnitTest++/src/XmlTestReporter.h new file mode 100644 index 0000000..884123b --- /dev/null +++ b/tests/UnitTest++/src/XmlTestReporter.h @@ -0,0 +1,34 @@ +#ifndef UNITTEST_XMLTESTREPORTER_H +#define UNITTEST_XMLTESTREPORTER_H + +#include "DeferredTestReporter.h" + +#include + +namespace UnitTest +{ + +class 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 -- cgit v1.2.3