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

Method OutputJsonKey

tests/gtest/gtest-all.cc:5566–5584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5564}
5565
5566void JsonUnitTestResultPrinter::OutputJsonKey(
5567 std::ostream* stream,
5568 const std::string& element_name,
5569 const std::string& name,
5570 const std::string& value,
5571 const std::string& indent,
5572 bool comma) {
5573 const std::vector<std::string>& allowed_names =
5574 GetReservedOutputAttributesForElement(element_name);
5575
5576 GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
5577 allowed_names.end())
5578 << "Key \"" << name << "\" is not allowed for value \"" << element_name
5579 << "\".";
5580
5581 *stream << indent << "\"" << name << "\": \"" << EscapeJson(value) << "\"";
5582 if (comma)
5583 *stream << ",\n";
5584}
5585
5586void JsonUnitTestResultPrinter::OutputJsonKey(
5587 std::ostream* stream,

Callers

nothing calls this directly

Calls 4

StreamableToStringFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected