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

Method OutputXmlAttribute

test/common/gtest/gtest.cpp:5047–5061  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5045}
5046
5047void XmlUnitTestResultPrinter::OutputXmlAttribute(
5048 std::ostream* stream,
5049 const std::string& element_name,
5050 const std::string& name,
5051 const std::string& value) {
5052 const std::vector<std::string>& allowed_names =
5053 GetReservedAttributesForElement(element_name);
5054
5055 GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
5056 allowed_names.end())
5057 << "Attribute " << name << " is not allowed for element <" << element_name
5058 << ">.";
5059
5060 *stream << " " << name << "=\"" << EscapeXmlAttribute(value) << "\"";
5061}
5062
5063// Prints an XML representation of a TestInfo object.
5064// TODO(wan): There is also value in printing properties with the plain printer.

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected