Produces a string representing the test properties in a result as a JSON dictionary.
| 5779 | // Produces a string representing the test properties in a result as |
| 5780 | // a JSON dictionary. |
| 5781 | std::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 |
nothing calls this directly
no test coverage detected