MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / PrintXmlTestCase

Method PrintXmlTestCase

rtpose_wrapper/src/gtest/gtest-all.cpp:4575–4593  ·  view source on GitHub ↗

Prints an XML representation of a TestCase object

Source from the content-addressed store, hash-verified

4573
4574// Prints an XML representation of a TestCase object
4575void 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.
4596void XmlUnitTestResultPrinter::PrintXmlUnitTest(FILE* out,

Callers

nothing calls this directly

Calls 7

StringStreamToStringFunction · 0.85
total_test_countMethod · 0.80
failed_test_countMethod · 0.80
disabled_test_countMethod · 0.80
elapsed_timeMethod · 0.80
GetTestInfoMethod · 0.80

Tested by

no test coverage detected