4#ifndef QJUNITTESTLOGGER_P_H
5#define QJUNITTESTLOGGER_P_H
18#include <QtTest/qttestglobal.h>
20#include <QtTest/private/qabstracttestlogger_p.h>
21#include <QtTest/private/qtestelementattribute_p.h>
22#include <QtCore/qmutex.h>
28class QTestJUnitStreamer;
45 void addIncident(IncidentTypes type,
const char *description,
46 const char *file =
nullptr,
int line = 0)
override;
47 void addMessage(MessageTypes type,
const QString &message,
48 const char *file =
nullptr,
int line = 0)
override;
53 void enterTestCase(
const char *name);
56 void addFailure(QTest::LogElementType elementType,
57 const char *failureType,
const QString &failureDescription);
59 QTestElement *currentTestSuite =
nullptr;
60 std::vector<QTestElement*> listOfTestcases;
61 QTestElement *currentTestCase =
nullptr;
62 QTestElement *systemOutputElement =
nullptr;
63 QTestElement *systemErrorElement =
nullptr;
70 int failureCounter = 0;
void stopLogging() override
Called after the end of a test run.
void enterTestFunction(const char *function) override
This virtual method is called before each test function is invoked.
void startLogging() override
Called before the start of a test run.
void addMessage(MessageTypes type, const QString &message, const char *file=nullptr, int line=0) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
void enterTestData(QTestData *) override
This virtual method is called before and after each call to a test function.
void addIncident(IncidentTypes type, const char *description, const char *file=nullptr, int line=0) override
This virtual method is called when an event occurs that relates to the resolution of the test.
QJUnitTestLogger(const char *filename)
void addBenchmarkResult(const QBenchmarkResult &) override
This virtual method is called after a benchmark has been run enough times to produce usable data.
void leaveTestFunction() override
This virtual method is called after a test function has completed, to match \l enterTestFunction().