Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/testlib/qtestelementattribute.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | QTestElementAttribute::QTestElementAttribute() | - | ||||||
6 | :attributeValue(0), | - | ||||||
7 | attributeIndex(QTest::AI_Undefined) | - | ||||||
8 | { | - | ||||||
9 | } executed 88332 times by 1 test: end of block Executed by:
| 88332 | ||||||
10 | - | |||||||
11 | QTestElementAttribute::~QTestElementAttribute() | - | ||||||
12 | { | - | ||||||
13 | delete[] attributeValue; | - | ||||||
14 | } executed 88332 times by 1 test: end of block Executed by:
| 88332 | ||||||
15 | - | |||||||
16 | const char *QTestElementAttribute::value() const | - | ||||||
17 | { | - | ||||||
18 | return executed 54420 times by 1 test: attributeValue;return attributeValue; Executed by:
executed 54420 times by 1 test: return attributeValue; Executed by:
| 54420 | ||||||
19 | } | - | ||||||
20 | - | |||||||
21 | const char *QTestElementAttribute::name() const | - | ||||||
22 | { | - | ||||||
23 | const char *AttributeNames[] = | - | ||||||
24 | { | - | ||||||
25 | "name", | - | ||||||
26 | "result", | - | ||||||
27 | "tests", | - | ||||||
28 | "failures", | - | ||||||
29 | "errors", | - | ||||||
30 | "type", | - | ||||||
31 | "description", | - | ||||||
32 | "value", | - | ||||||
33 | "qtestversion", | - | ||||||
34 | "qtversion", | - | ||||||
35 | "file", | - | ||||||
36 | "line", | - | ||||||
37 | "metric", | - | ||||||
38 | "tag", | - | ||||||
39 | "value", | - | ||||||
40 | "iterations" | - | ||||||
41 | }; | - | ||||||
42 | - | |||||||
43 | if (attributeIndex != QTest::AI_Undefined
| 0-22169 | ||||||
44 | return executed 22169 times by 1 test: AttributeNames[attributeIndex];return AttributeNames[attributeIndex]; Executed by:
executed 22169 times by 1 test: return AttributeNames[attributeIndex]; Executed by:
| 22169 | ||||||
45 | - | |||||||
46 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
47 | } | - | ||||||
48 | - | |||||||
49 | QTest::AttributeIndex QTestElementAttribute::index() const | - | ||||||
50 | { | - | ||||||
51 | return executed 206561 times by 1 test: attributeIndex;return attributeIndex; Executed by:
executed 206561 times by 1 test: return attributeIndex; Executed by:
| 206561 | ||||||
52 | } | - | ||||||
53 | - | |||||||
54 | bool QTestElementAttribute::isNull() const | - | ||||||
55 | { | - | ||||||
56 | return never executed: attributeIndex == QTest::AI_Undefined;return attributeIndex == QTest::AI_Undefined; never executed: return attributeIndex == QTest::AI_Undefined; | 0 | ||||||
57 | } | - | ||||||
58 | - | |||||||
59 | bool QTestElementAttribute::setPair(QTest::AttributeIndex index, const char *value) | - | ||||||
60 | { | - | ||||||
61 | if (!value
| 0-88746 | ||||||
62 | return never executed: false;return false; never executed: return false; | 0 | ||||||
63 | - | |||||||
64 | delete[] attributeValue; | - | ||||||
65 | - | |||||||
66 | attributeIndex = index; | - | ||||||
67 | attributeValue = qstrdup(value); | - | ||||||
68 | - | |||||||
69 | return executed 88746 times by 1 test: attributeValue != 0;return attributeValue != 0; Executed by:
executed 88746 times by 1 test: return attributeValue != 0; Executed by:
| 88746 | ||||||
70 | } | - | ||||||
71 | - | |||||||
72 | - | |||||||
Switch to Source code | Preprocessed file |