Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qxmltestlogger_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QXMLTESTLOGGER_P_H
5#define QXMLTESTLOGGER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18
19#include <QtTest/private/qabstracttestlogger_p.h>
20
22
24{
25public:
26 enum XmlMode { Complete = 0, Light };
27
28 QXmlTestLogger(XmlMode mode, const char *filename);
30
31 void startLogging() override;
32 void stopLogging() override;
33
34 void enterTestFunction(const char *function) override;
35 void leaveTestFunction() override;
36
37 void addIncident(IncidentTypes type, const char *description,
38 const char *file = nullptr, int line = 0) override;
39 void addBenchmarkResult(const QBenchmarkResult &result) override;
40
42 const char *file = nullptr, int line = 0) override;
43
44 [[nodiscard]] static bool xmlCdata(QTestCharBuffer *dest, char const *src);
45 [[nodiscard]] static bool xmlQuote(QTestCharBuffer *dest, char const *src);
46private:
47 [[nodiscard]] static int xmlCdata(QTestCharBuffer *dest, char const *src, qsizetype n);
48 [[nodiscard]] static int xmlQuote(QTestCharBuffer *dest, char const *src, qsizetype n);
49
50 XmlMode xmlmode;
51};
52
54
55#endif
Base class for test loggers.
IncidentTypes
\value Pass The test ran to completion successfully.
MessageTypes
The members whose names begin with Q describe messages that originate in calls, by the test or code u...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
void startLogging() override
Called before the start of a test run.
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.
static bool xmlCdata(QTestCharBuffer *dest, char const *src)
void addBenchmarkResult(const QBenchmarkResult &result) override
This virtual method is called after a benchmark has been run enough times to produce usable data.
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 enterTestFunction(const char *function) override
This virtual method is called before each test function is invoked.
void stopLogging() override
Called after the end of a test run.
static bool xmlQuote(QTestCharBuffer *dest, char const *src)
QXmlTestLogger(XmlMode mode, const char *filename)
void leaveTestFunction() override
This virtual method is called after a test function has completed, to match \l enterTestFunction().
Combined button and popup list for selecting options.
GLenum mode
GLenum src
GLenum type
GLuint GLsizei const GLchar * message
GLfloat n
GLuint64EXT * result
[6]
ptrdiff_t qsizetype
Definition qtypes.h:165
QFile file
[0]