Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qappletestlogger_p.h
Go to the documentation of this file.
1// Copyright (C) 2018 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 QAPPLETESTLOGGER_P_H
5#define QAPPLETESTLOGGER_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#include <QtTest/private/qabstracttestlogger_p.h>
19
20#include <QtCore/private/qcore_mac_p.h>
21
23
24#if defined(QT_USE_APPLE_UNIFIED_LOGGING)
25class QAppleTestLogger : public QAbstractTestLogger
26{
27public:
28 static bool debugLoggingEnabled();
29
30 QAppleTestLogger();
31
32 void enterTestFunction(const char *function) override;
33 void leaveTestFunction() override;
34
35 void addIncident(IncidentTypes type, const char *description,
36 const char *file = nullptr, int line = 0) override;
38 const QString &) override;
39 void addMessage(MessageTypes type, const QString &message,
40 const char *file = nullptr, int line = 0) override;
41
42 void addBenchmarkResult(const QBenchmarkResult &result) override
43 { Q_UNUSED(result); }
44
45private:
46 QString subsystem() const;
47 QString testIdentifier() const;
48};
49#endif
50
52
53#endif // QAPPLETESTLOGGER_P_H
Base class for test loggers.
virtual void addBenchmarkResult(const QBenchmarkResult &result)=0
This virtual method is called after a benchmark has been run enough times to produce usable data.
virtual void leaveTestFunction()=0
This virtual method is called after a test function has completed, to match \l enterTestFunction().
virtual void addMessage(QtMsgType, const QMessageLogContext &, const QString &)
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void enterTestFunction(const char *function)=0
This virtual method is called before each test function is invoked.
virtual void addIncident(IncidentTypes type, const char *description, const char *file=nullptr, int line=0)=0
This virtual method is called when an event occurs that relates to the resolution of the test.
\inmodule QtCore
Definition qlogging.h:39
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
QtMsgType
Definition qlogging.h:29
GLenum type
GLuint GLsizei const GLchar * message
GLuint64EXT * result
[6]
#define Q_UNUSED(x)
QFile file
[0]