| 5045 | } |
| 5046 | |
| 5047 | void 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. |
nothing calls this directly
no test coverage detected