| 4747 | } |
| 4748 | |
| 4749 | void XmlUnitTestResultPrinter::OutputXmlAttribute( |
| 4750 | std::ostream* stream, |
| 4751 | const std::string& element_name, |
| 4752 | const std::string& name, |
| 4753 | const std::string& value) { |
| 4754 | const std::vector<std::string>& allowed_names = |
| 4755 | GetReservedAttributesForElement(element_name); |
| 4756 | |
| 4757 | GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) != |
| 4758 | allowed_names.end()) |
| 4759 | << "Attribute " << name << " is not allowed for element <" << element_name |
| 4760 | << ">."; |
| 4761 | |
| 4762 | *stream << " " << name << "=\"" << EscapeXmlAttribute(value) << "\""; |
| 4763 | } |
| 4764 | |
| 4765 | // Prints an XML representation of a TestInfo object. |
| 4766 | // TODO(wan): There is also value in printing properties with the plain printer. |
nothing calls this directly
no test coverage detected