From 7a2050d4d7eea672716a7d85c2fee2607879862a Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Thu, 1 Mar 2018 13:19:34 -0800 Subject: [PATCH] Use a full message in the JSON output for failures The full message unlike summary also includes stack trace. --- googletest/src/gtest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 15cc9073..74c43a41 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -4012,9 +4012,9 @@ void JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream, const std::string location = internal::FormatCompilerIndependentFileLocation(part.file_name(), part.line_number()); - const std::string summary = EscapeJson(location + "\n" + part.summary()); + const std::string message = EscapeJson(location + "\n" + part.message()); *stream << kIndent << " {\n" - << kIndent << " \"failure\": \"" << summary << "\",\n" + << kIndent << " \"failure\": \"" << message << "\",\n" << kIndent << " \"type\": \"\"\n" << kIndent << " }"; }