MCPcopy Create free account
hub / github.com/apache/singa / OutputXmlAttribute

Method OutputXmlAttribute

test/gtest/gtest-all.cc:4749–4763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4747}
4748
4749void 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.

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected