summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestlightxmlstreamer.cpp3
-rw-r--r--src/testlib/qtestlogger.cpp3
-rw-r--r--src/testlib/qtestxmlstreamer.cpp3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/testlib/qtestlightxmlstreamer.cpp b/src/testlib/qtestlightxmlstreamer.cpp
index 0ac9ea8..8c22a4f 100644
--- a/src/testlib/qtestlightxmlstreamer.cpp
+++ b/src/testlib/qtestlightxmlstreamer.cpp
@@ -87,12 +87,13 @@ void QTestLightXmlStreamer::formatStart(const QTestElement *element, QTestCharBu
QXmlTestLogger::xmlQuote(&quotedFile, element->attributeValue(QTest::AI_File));
QXmlTestLogger::xmlCdata(&cdataDesc, element->attributeValue(QTest::AI_Description));
- QTest::qt_asprintf(formatted, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <Description><![CDATA[%s]]></Description>\n</Message>\n",
+ QTest::qt_asprintf(formatted, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <DataTag>%s</DataTag><Description><![CDATA[%s]]></Description>\n</Message>\n",
element->attributeValue(QTest::AI_Type),
element->attributeName(QTest::AI_File),
quotedFile.constData(),
element->attributeName(QTest::AI_Line),
element->attributeValue(QTest::AI_Line),
+ element->attributeValue(QTest::AI_Tag) ? element->attributeValue(QTest::AI_Tag) : "",
cdataDesc.constData());
break;
}
diff --git a/src/testlib/qtestlogger.cpp b/src/testlib/qtestlogger.cpp
index 6c76388..79bb84c 100644
--- a/src/testlib/qtestlogger.cpp
+++ b/src/testlib/qtestlogger.cpp
@@ -318,6 +318,9 @@ void QTestLogger::addMessage(MessageTypes type, const char *message, const char
break;
}
+ const char *tag = QTestResult::currentDataTag();
+ if (tag)
+ errorElement->addAttribute(QTest::AI_Tag, tag);
errorElement->addAttribute(QTest::AI_Type, typeBuf);
errorElement->addAttribute(QTest::AI_Description, message);
diff --git a/src/testlib/qtestxmlstreamer.cpp b/src/testlib/qtestxmlstreamer.cpp
index b9946e5..9addb31 100644
--- a/src/testlib/qtestxmlstreamer.cpp
+++ b/src/testlib/qtestxmlstreamer.cpp
@@ -111,12 +111,13 @@ void QTestXmlStreamer::formatStart(const QTestElement *element, QTestCharBuffer
QXmlTestLogger::xmlQuote(&quotedFile, element->attributeValue(QTest::AI_File));
QXmlTestLogger::xmlCdata(&cdataDesc, element->attributeValue(QTest::AI_Description));
- QTest::qt_asprintf(formatted, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <Description><![CDATA[%s]]></Description>\n</Message>\n",
+ QTest::qt_asprintf(formatted, "<Message type=\"%s\" %s=\"%s\" %s=\"%s\">\n <DataTag>%s</DataTag>\n <Description><![CDATA[%s]]></Description>\n</Message>\n",
element->attributeValue(QTest::AI_Type),
element->attributeName(QTest::AI_File),
quotedFile.constData(),
element->attributeName(QTest::AI_Line),
element->attributeValue(QTest::AI_Line),
+ element->attributeValue(QTest::AI_Tag) ? element->attributeValue(QTest::AI_Tag) : "",
cdataDesc.constData());
break;
}