MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / PrintXmlTestCase

Method PrintXmlTestCase

tests/external/gmock-1.7.0/gtest/src/gtest.cc:3333–3356  ·  view source on GitHub ↗

Prints an XML representation of a TestCase object

Source from the content-addressed store, hash-verified

3331
3332// Prints an XML representation of a TestCase object
3333void XmlUnitTestResultPrinter::PrintXmlTestCase(std::ostream* stream,
3334 const TestCase& test_case) {
3335 const std::string kTestsuite = "testsuite";
3336 *stream << " <" << kTestsuite;
3337 OutputXmlAttribute(stream, kTestsuite, "name", test_case.name());
3338 OutputXmlAttribute(stream, kTestsuite, "tests",
3339 StreamableToString(test_case.reportable_test_count()));
3340 OutputXmlAttribute(stream, kTestsuite, "failures",
3341 StreamableToString(test_case.failed_test_count()));
3342 OutputXmlAttribute(
3343 stream, kTestsuite, "disabled",
3344 StreamableToString(test_case.reportable_disabled_test_count()));
3345 OutputXmlAttribute(stream, kTestsuite, "errors", "0");
3346 OutputXmlAttribute(stream, kTestsuite, "time",
3347 FormatTimeInMillisAsSeconds(test_case.elapsed_time()));
3348 *stream << TestPropertiesAsXmlAttributes(test_case.ad_hoc_test_result())
3349 << ">\n";
3350
3351 for (int i = 0; i < test_case.total_test_count(); ++i) {
3352 if (test_case.GetTestInfo(i)->is_reportable())
3353 OutputXmlTestInfo(stream, test_case.name(), *test_case.GetTestInfo(i));
3354 }
3355 *stream << " </" << kTestsuite << ">\n";
3356}
3357
3358// Prints an XML summary of unit_test to output stream out.
3359void XmlUnitTestResultPrinter::PrintXmlUnitTest(std::ostream* stream,

Callers

nothing calls this directly

Calls 8

StreamableToStringFunction · 0.50
reportable_test_countMethod · 0.45
failed_test_countMethod · 0.45
elapsed_timeMethod · 0.45
total_test_countMethod · 0.45
GetTestInfoMethod · 0.45

Tested by

no test coverage detected