MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / OutputXmlTestPartResult

Method OutputXmlTestPartResult

test/common/gtest/gtest.cpp:5107–5122  ·  view source on GitHub ↗

Prints an XML representation of a TestPartResult object.

Source from the content-addressed store, hash-verified

5105
5106// Prints an XML representation of a TestPartResult object.
5107void XmlUnitTestResultPrinter::OutputXmlTestPartResult(::std::ostream* stream,
5108 const BaseTestPartResult *base_test_part_result){
5109 const TestPartResult* part = DownCast_<const TestPartResult*>(base_test_part_result);
5110 if(part != NULL){
5111 const string location = internal::FormatCompilerIndependentFileLocation(
5112 part->file_name(), part->line_number());
5113 const string summary = location + "\n" + part->summary();
5114 *stream << " <failure message=\""
5115 << EscapeXmlAttribute(summary.c_str())
5116 << "\" type=\""
5117 << ((base_test_part_result->type() == BaseTestPartResult::kFatalFailure) ? "fatal_failure\">" : "non_fatal_failure\">");
5118 const string detail = location + "\n" + part->message();
5119 OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());
5120 *stream << "</failure>\n";
5121 }
5122}
5123
5124// Prints an XML representation of a TestCase object
5125void XmlUnitTestResultPrinter::PrintXmlTestCase(std::ostream* stream,

Callers 1

OutputXmlTestInfoMethod · 0.80

Calls 3

typeMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected