aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2019-10-10 09:21:47 -0400
committerGennadiy Civil <misterg@google.com>2019-10-10 09:21:47 -0400
commit5395345ca4f0c596110188688ed990e0de5a181c (patch)
tree418dbcc9e69fea355efecaf8648abf387c80c25f /googletest/src
parentcb1d5db1a104c7161fce89483dcfbe0ccb9bb28b (diff)
parent2ed2211db99ab4f3e4d11078c78ad48a5b692f02 (diff)
downloadgoogletest-5395345ca4f0c596110188688ed990e0de5a181c.tar.gz
googletest-5395345ca4f0c596110188688ed990e0de5a181c.tar.bz2
googletest-5395345ca4f0c596110188688ed990e0de5a181c.zip
Merge pull request #2497 from thejcannon:handle_null_filename
PiperOrigin-RevId: 273585229
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest-test-part.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/googletest/src/gtest-test-part.cc b/googletest/src/gtest-test-part.cc
index 178317a6..a938683c 100644
--- a/googletest/src/gtest-test-part.cc
+++ b/googletest/src/gtest-test-part.cc
@@ -31,6 +31,8 @@
// The Google C++ Testing and Mocking Framework (Google Test)
#include "gtest/gtest-test-part.h"
+
+#include "gtest/internal/gtest-port.h"
#include "src/gtest-internal-inl.h"
namespace testing {
@@ -46,7 +48,9 @@ std::string TestPartResult::ExtractSummary(const char* message) {
// Prints a TestPartResult object.
std::ostream& operator<<(std::ostream& os, const TestPartResult& result) {
- return os << result.file_name() << ":" << result.line_number() << ": "
+ return os << internal::FormatFileLocation(result.file_name(),
+ result.line_number())
+ << " "
<< (result.type() == TestPartResult::kSuccess
? "Success"
: result.type() == TestPartResult::kSkip