Prints an XML representation of a TestCase object
| 4573 | |
| 4574 | // Prints an XML representation of a TestCase object |
| 4575 | void XmlUnitTestResultPrinter::PrintXmlTestCase(FILE* out, |
| 4576 | const TestCase& test_case) { |
| 4577 | fprintf(out, |
| 4578 | " <testsuite name=\"%s\" tests=\"%d\" failures=\"%d\" " |
| 4579 | "disabled=\"%d\" ", |
| 4580 | EscapeXmlAttribute(test_case.name()).c_str(), |
| 4581 | test_case.total_test_count(), |
| 4582 | test_case.failed_test_count(), |
| 4583 | test_case.disabled_test_count()); |
| 4584 | fprintf(out, |
| 4585 | "errors=\"0\" time=\"%s\">\n", |
| 4586 | FormatTimeInMillisAsSeconds(test_case.elapsed_time()).c_str()); |
| 4587 | for (int i = 0; i < test_case.total_test_count(); ++i) { |
| 4588 | ::std::stringstream stream; |
| 4589 | OutputXmlTestInfo(&stream, test_case.name(), *test_case.GetTestInfo(i)); |
| 4590 | fprintf(out, "%s", StringStreamToString(&stream).c_str()); |
| 4591 | } |
| 4592 | fprintf(out, " </testsuite>\n"); |
| 4593 | } |
| 4594 | |
| 4595 | // Prints an XML summary of unit_test to output stream out. |
| 4596 | void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out, |
nothing calls this directly
no test coverage detected