qtestelementattribute.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/testlib/qtestelementattribute.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QTestElementAttribute::QTestElementAttribute()-
6 :attributeValue(0),-
7 attributeIndex(QTest::AI_Undefined)-
8{-
9}
executed 88332 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
88332
10-
11QTestElementAttribute::~QTestElementAttribute()-
12{-
13 delete[] attributeValue;-
14}
executed 88332 times by 1 test: end of block
Executed by:
  • tst_selftests - unknown status
88332
15-
16const char *QTestElementAttribute::value() const-
17{-
18 return
executed 54420 times by 1 test: return attributeValue;
Executed by:
  • tst_selftests - unknown status
attributeValue;
executed 54420 times by 1 test: return attributeValue;
Executed by:
  • tst_selftests - unknown status
54420
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
attributeIndex...::AI_UndefinedDescription
TRUEevaluated 22169 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
FALSEnever evaluated
)
0-22169
44 return
executed 22169 times by 1 test: return AttributeNames[attributeIndex];
Executed by:
  • tst_selftests - unknown status
AttributeNames[attributeIndex];
executed 22169 times by 1 test: return AttributeNames[attributeIndex];
Executed by:
  • tst_selftests - unknown status
22169
45-
46 return
never executed: return 0;
0;
never executed: return 0;
0
47}-
48-
49QTest::AttributeIndex QTestElementAttribute::index() const-
50{-
51 return
executed 206561 times by 1 test: return attributeIndex;
Executed by:
  • tst_selftests - unknown status
attributeIndex;
executed 206561 times by 1 test: return attributeIndex;
Executed by:
  • tst_selftests - unknown status
206561
52}-
53-
54bool QTestElementAttribute::isNull() const-
55{-
56 return
never executed: return attributeIndex == QTest::AI_Undefined;
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
!valueDescription
TRUEnever evaluated
FALSEevaluated 88746 times by 1 test
Evaluated by:
  • tst_selftests - unknown status
)
0-88746
62 return
never executed: return false;
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: return attributeValue != 0;
Executed by:
  • tst_selftests - unknown status
attributeValue != 0;
executed 88746 times by 1 test: return attributeValue != 0;
Executed by:
  • tst_selftests - unknown status
88746
70}-
71-
72-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9