Only write ">\n" once when there is failure and skipped tests.
This commit is contained in:
parent
59e5b401a5
commit
d28d05cc64
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user