MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / TestPropertiesAsXmlAttributes

Method TestPropertiesAsXmlAttributes

tests/gtest/gtest-all.cc:5393–5402  ·  view source on GitHub ↗

Produces a string representing the test properties in a result as space delimited XML attributes based on the property key="value" pairs.

Source from the content-addressed store, hash-verified

5391// Produces a string representing the test properties in a result as space
5392// delimited XML attributes based on the property key="value" pairs.
5393std::string XmlUnitTestResultPrinter::TestPropertiesAsXmlAttributes(
5394 const TestResult& result) {
5395 Message attributes;
5396 for (int i = 0; i < result.test_property_count(); ++i) {
5397 const TestProperty& property = result.GetTestProperty(i);
5398 attributes << " " << property.key() << "="
5399 << "\"" << EscapeXmlAttribute(property.value()) << "\"";
5400 }
5401 return attributes.GetString();
5402}
5403
5404void XmlUnitTestResultPrinter::OutputXmlTestProperties(
5405 std::ostream* stream, const TestResult& result) {

Callers

nothing calls this directly

Calls 4

test_property_countMethod · 0.80
keyMethod · 0.80
valueMethod · 0.80
GetStringMethod · 0.80

Tested by

no test coverage detected