- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# XmlTestReporter.h

    00001 #ifndef UNITTEST_XMLTESTREPORTER_H
    00002 #define UNITTEST_XMLTESTREPORTER_H
    00003
    00004 #include "DeferredTestReporter.h"
    00005
    00006 #include <iosfwd>
    00007
    00008 namespace UnitTest
    00009 {
    00010
    00011 class XmlTestReporter : public DeferredTestReporter
    00012 {
    00013 public:
    00014     explicit XmlTestReporter(std::ostream& ostream);
    00015
    00016     virtual void ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed);
    00017
    00018 private:
    00019     XmlTestReporter(XmlTestReporter const&);
    00020     XmlTestReporter& operator=(XmlTestReporter const&);
    00021
    00022     void AddXmlElement(std::ostream& os, char const* encoding);
    00023     void BeginResults(std::ostream& os, int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed);
    00024     void EndResults(std::ostream& os);
    00025     void BeginTest(std::ostream& os, DeferredTestResult const& result);
    00026     void AddFailure(std::ostream& os, DeferredTestResult const& result);
    00027     void EndTest(std::ostream& os, DeferredTestResult const& result);
    00028
    00029     std::ostream& m_ostream;
    00030 };
    00031
    00032 }
    00033
    00034 #endif