Commit d28d05cc authored by Mario Voorsluys's avatar Mario Voorsluys
Browse files

Only write ">\n" once when there is failure and skipped tests.

parent 59e5b401
......@@ -4085,7 +4085,7 @@ void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
for (int i = 0; i < result.total_part_count(); ++i) {
const TestPartResult& part = result.GetTestPartResult(i);
if (part.failed()) {
if (++failures == 1) {
if (++failures == 1 && skips == 0) {
*stream << ">\n";
}
const std::string location =
......@@ -4099,7 +4099,7 @@ void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());
*stream << "</failure>\n";
} else if (part.skipped()) {
if (++skips == 1) {
if (++skips == 1 && failures == 0) {
*stream << ">\n";
}
const std::string location =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment