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 QTESTELEMENTATTRIBUTE_P_H
5#define QTESTELEMENTATTRIBUTE_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/qttestglobal.h>
19#include <QtCore/private/qglobal_p.h>
20
21QT_BEGIN_NAMESPACE
22
23
24namespace QTest {
25
26 enum AttributeIndex
27 {
28 AI_Undefined = -1,
29 AI_Name,
30 AI_Tests,
31 AI_Failures,
32 AI_Errors,
33 AI_Type,
34 AI_Message,
35 AI_PropertyValue,
36 AI_Value,
37 AI_Time,
38 AI_Timestamp,
39 AI_Hostname,
40 AI_Classname,
41 AI_Skipped
42 };
43
44 enum LogElementType
45 {
46 LET_Undefined = -1,
47 LET_Property,
48 LET_Properties,
49 LET_Failure,
50 LET_Error,
51 LET_TestCase,
52 LET_TestSuite,
53 LET_Text,
54 LET_SystemError,
55 LET_SystemOutput,
56 LET_Skipped
57 };
58}
59
60class QTestElementAttribute
61{
62 public:
63 QTestElementAttribute();
64 ~QTestElementAttribute();
65
66 const char *value() const;
67 const char *name() const;
68 QTest::AttributeIndex index() const;
69 bool isNull() const;
70 bool setPair(QTest::AttributeIndex attributeIndex, const char *value);
71
72 private:
73 char *attributeValue = nullptr;
74 QTest::AttributeIndex attributeIndex = QTest::AI_Undefined;
75};
76
77QT_END_NAMESPACE
78
79#endif
80

source code of qtbase/src/testlib/qtestelementattribute_p.h