Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qxctestlogger_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
QXCTESTLOGGER_P_H
5
#
define
QXCTESTLOGGER_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
<
dispatch
/
dispatch
.
h
>
21
22
Q_FORWARD_DECLARE_OBJC_CLASS
(
XCTest
);
23
Q_FORWARD_DECLARE_OBJC_CLASS
(
XCTestRun
);
24
Q_FORWARD_DECLARE_OBJC_CLASS
(
NSMutableArray
);
25
26
QT_BEGIN_NAMESPACE
27
28
class
QXcodeTestLogger :
public
QAbstractTestLogger
29
{
30
public
:
31
QXcodeTestLogger();
32
~QXcodeTestLogger() override;
33
34
void
startLogging() override;
35
void
stopLogging() override;
36
37
void
enterTestFunction(
const
char
*function) override;
38
void
leaveTestFunction() override;
39
40
void
addIncident(IncidentTypes type,
const
char
*description,
41
const
char
*file =
nullptr
,
int
line = 0) override;
42
43
void
addMessage(MessageTypes type,
const
QString &message,
44
const
char
*file =
nullptr
,
int
line = 0) override;
45
46
void
addBenchmarkResult(
const
QBenchmarkResult &result) override;
47
48
static
bool
canLogTestProgress();
49
static
int
parseCommandLineArgument(
const
char
*argument);
50
51
static
bool
isActive();
52
53
private
:
54
void
pushTestRunForTest(XCTest *test,
bool
start);
55
XCTestRun *popTestRun();
56
57
NSMutableArray<XCTestRun *> *m_testRuns;
58
59
static
QXcodeTestLogger *s_currentTestLogger;
60
};
61
62
63
QT_END_NAMESPACE
64
65
#
endif
Q_FORWARD_DECLARE_OBJC_CLASS
Q_FORWARD_DECLARE_OBJC_CLASS(NSString)
WAIT_FOR_BARRIER
#define WAIT_FOR_BARRIER(b)
Definition
qxctestlogger.mm:86
SIGNAL_BARRIER
#define SIGNAL_BARRIER(b)
Definition
qxctestlogger.mm:87
FOREACH_BARRIER
#define FOREACH_BARRIER(cmd)
Definition
qxctestlogger.mm:78
Q_FORWARD_DECLARE_OBJC_CLASS
Q_FORWARD_DECLARE_OBJC_CLASS(XCTest)
Q_FORWARD_DECLARE_OBJC_CLASS
Q_FORWARD_DECLARE_OBJC_CLASS(XCTestRun)
Q_FORWARD_DECLARE_OBJC_CLASS
Q_FORWARD_DECLARE_OBJC_CLASS(NSMutableArray)
qtbase
src
testlib
qxctestlogger_p.h
Generated on
for Qt by
1.18.0