| 5564 | } |
| 5565 | |
| 5566 | void 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 | |
| 5586 | void JsonUnitTestResultPrinter::OutputJsonKey( |
| 5587 | std::ostream* stream, |
nothing calls this directly
no test coverage detected