Fix JSON output format #3884

This commit is contained in:
Denis Hananein 2022-10-11 12:11:46 +02:00
parent d9bb8412d6
commit 1d505b8e40

View File

@ -4829,6 +4829,9 @@ void JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream* stream,
// If there was a test failure outside of one of the test suites (like in a
// test environment) include that in the output.
if (unit_test.ad_hoc_test_result().Failed()) {
if (comma) {
*stream << ",\n";
}
OutputJsonTestSuiteForTestResult(stream, unit_test.ad_hoc_test_result());
}