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

Method TestPropertiesAsJson

tests/gtest/gtest-all.cc:5781–5790  ·  view source on GitHub ↗

Produces a string representing the test properties in a result as a JSON dictionary.

Source from the content-addressed store, hash-verified

5779// Produces a string representing the test properties in a result as
5780// a JSON dictionary.
5781std::string JsonUnitTestResultPrinter::TestPropertiesAsJson(
5782 const TestResult& result, const std::string& indent) {
5783 Message attributes;
5784 for (int i = 0; i < result.test_property_count(); ++i) {
5785 const TestProperty& property = result.GetTestProperty(i);
5786 attributes << ",\n" << indent << "\"" << property.key() << "\": "
5787 << "\"" << EscapeJson(property.value()) << "\"";
5788 }
5789 return attributes.GetString();
5790}
5791
5792// End JsonUnitTestResultPrinter
5793

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