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

#include "qtestbasicstreamer.h"

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);
};

#endif