summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest.cc
diff options
context:
space:
mode:
authorAaron Jacobs <jacobsa@google.com>2023-03-23 03:19:06 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-03-23 03:19:44 (GMT)
commit5fce13091d223069436ad7a5aad53f026b0f2041 (patch)
tree616ce824189315035025f25977ebcc0a5be59859 /googletest/src/gtest.cc
parent974e18ee6f146a2418f9cea83170c640e7d622d6 (diff)
downloadgoogletest-5fce13091d223069436ad7a5aad53f026b0f2041.zip
googletest-5fce13091d223069436ad7a5aad53f026b0f2041.tar.gz
googletest-5fce13091d223069436ad7a5aad53f026b0f2041.tar.bz2
gtest.cc: add a newline after a failure when there is no OS stack trace.
This makes the behavior consistent when GTEST_STACK_TRACE_DEPTH is set to zero and not: there is always vertical whitespace separating failure messages. PiperOrigin-RevId: 518744611 Change-Id: I5b4af40633849850660504c3f497a76601d4311d
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r--googletest/src/gtest.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 55f8e50..897c0cd 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -5319,6 +5319,8 @@ void UnitTest::AddTestPartResult(TestPartResult::Type result_type,
if (os_stack_trace.c_str() != nullptr && !os_stack_trace.empty()) {
msg << internal::kStackTraceMarker << os_stack_trace;
+ } else {
+ msg << "\n";
}
const TestPartResult result = TestPartResult(