| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | QTestElementAttribute::QTestElementAttribute() | - |
| 6 | :attributeValue(0), | - |
| 7 | attributeIndex(QTest::AI_Undefined) | - |
| 8 | { | - |
| 9 | } | 0 |
| 10 | | - |
| 11 | QTestElementAttribute::~QTestElementAttribute() | - |
| 12 | { | - |
| 13 | delete[] attributeValue; | - |
| 14 | } | 0 |
| 15 | | - |
| 16 | const char *QTestElementAttribute::value() const | - |
| 17 | { | - |
| 18 | return attributeValue; never executed: return attributeValue; | 0 |
| 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) 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 | | - |
| 49 | QTest::AttributeIndex QTestElementAttribute::index() const | - |
| 50 | { | - |
| 51 | return attributeIndex; never executed: return attributeIndex; | 0 |
| 52 | } | - |
| 53 | | - |
| 54 | bool QTestElementAttribute::isNull() const | - |
| 55 | { | - |
| 56 | 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 |
| 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 | | - |
| | |