1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
// //////////////////////////////////////////////////////////////////////////
// Header file ClockerXmlHook.h for class ClockerXmlHook
// (c)Copyright 2000, Baptiste Lepilleur.
// Created: 2002/06/14
// //////////////////////////////////////////////////////////////////////////
#ifndef CLOCKERXMLHOOK_H
#define CLOCKERXMLHOOK_H
#include <cppunit/XmlOutputterHook.h>
class ClockerModel;
/// XML output hook to add test timing and test hierarchy timing.
class ClockerXmlHook : public CPPUNIT_NS::XmlOutputterHook
{
public:
/*! Constructs a ClockerXmlHook object.
*/
ClockerXmlHook( ClockerModel *model );
/// Destructor.
virtual ~ClockerXmlHook();
void endDocument( CPPUNIT_NS::XmlDocument *document );
void failTestAdded( CPPUNIT_NS::XmlDocument *document,
CPPUNIT_NS::XmlElement *testElement,
CPPUNIT_NS::Test *test,
CPPUNIT_NS::TestFailure *failure );
void successfulTestAdded( CPPUNIT_NS::XmlDocument *document,
CPPUNIT_NS::XmlElement *testElement,
CPPUNIT_NS::Test *test );
void statisticsAdded( CPPUNIT_NS::XmlDocument *document,
CPPUNIT_NS::XmlElement *statisticsElement );
private:
/// Prevents the use of the copy constructor.
ClockerXmlHook( const ClockerXmlHook &other );
/// Prevents the use of the copy operator.
void operator =( const ClockerXmlHook &other );
void addTimedTest( CPPUNIT_NS::XmlElement *parentElement,
int testIndex );
private:
ClockerModel *m_model;
};
// Inlines methods for ClockerXmlHook:
// -----------------------------------
#endif // CLOCKERXMLHOOK_H
|