Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/googletest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Hananein <i@zloylos.me>2022-10-11 13:11:46 +0300
committerDenis Hananein <i@zloylos.me>2022-10-11 13:11:46 +0300
commit1d505b8e40db0204fd0515673fa97137680cb8ac (patch)
treef65220d1349487f0801e9689579129293e48bb67
parentd9bb8412d60b993365abb53f00b6dad9b2c01b62 (diff)
Fix JSON output format #3884
-rw-r--r--googletest/src/gtest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 638d53bb..38594528 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -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());
}