summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestxunitstreamer.h
blob: 1ce9576df40996f2ff11a7403f7a41d97b643b84 (plain)
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
#ifndef QTESTXUNITSTREAMER_H
#define QTESTXUNITSTREAMER_H

#include "qtestbasicstreamer.h"

QT_BEGIN_NAMESPACE

class QTestLogger;

class QTestXunitStreamer: public QTestBasicStreamer
{
    public:
        QTestXunitStreamer();
        ~QTestXunitStreamer();

        void formatStart(const QTestElement *element = 0, char *formatted = 0) const;
        void formatEnd(const QTestElement *element = 0, char *formatted = 0) const;
        void formatAfterAttributes(const QTestElement *element = 0, char *formatted = 0) const;
        void formatAttributes(const QTestElementAttribute *attribute = 0, char *formatted = 0) const;
        void output(QTestElement *element) const;
        void outputElements(QTestElement *element, bool isChildElement = false) const;

    private:
        void displayXunitXmlHeader() const;
        static void indentForElement(const QTestElement* element, char* buf, int size);
};

QT_END_NAMESPACE

#endif