diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 58da0f1f0..d6aef6ad2 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -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 << "\n"; } else if (part.skipped()) { - if (++skips == 1) { + if (++skips == 1 && failures == 0) { *stream << ">\n"; } const std::string location =