qtestelementattribute.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5QTestElementAttribute::QTestElementAttribute() -
6 :attributeValue(0), -
7 attributeIndex(QTest::AI_Undefined) -
8{ -
9}
never executed: }
0
10 -
11QTestElementAttribute::~QTestElementAttribute() -
12{ -
13 delete[] attributeValue; -
14}
never executed: }
0
15 -
16const char *QTestElementAttribute::value() const -
17{ -
18 return attributeValue;
never executed: return attributeValue;
0
19} -
20 -
21const 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)
never evaluated: attributeIndex != QTest::AI_Undefined
0
44 return AttributeNames[attributeIndex];
never executed: return AttributeNames[attributeIndex];
0
45 -
46 return 0;
never executed: return 0;
0
47} -
48 -
49QTest::AttributeIndex QTestElementAttribute::index() const -
50{ -
51 return attributeIndex;
never executed: return attributeIndex;
0
52} -
53 -
54bool QTestElementAttribute::isNull() const -
55{ -
56 return attributeIndex == QTest::AI_Undefined;
never executed: return attributeIndex == QTest::AI_Undefined;
0
57} -
58 -
59bool QTestElementAttribute::setPair(QTest::AttributeIndex index, const char *value) -
60{ -
61 if (!value)
never evaluated: !value
0
62 return false;
never executed: return false;
0
63 -
64 delete[] attributeValue; -
65 -
66 attributeIndex = index; -
67 attributeValue = qstrdup(value); -
68 -
69 return (attributeValue!=0) ? true:false;
never executed: return (attributeValue!=0) ? true:false;
0
70} -
71 -
72 -
73 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial