From 2ed2211db99ab4f3e4d11078c78ad48a5b692f02 Mon Sep 17 00:00:00 2001 From: Joshua Cannon Date: Mon, 7 Oct 2019 13:56:47 -0500 Subject: Use FormatFileLocation for streaming file and line --- googletest/src/gtest-test-part.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'googletest/src') diff --git a/googletest/src/gtest-test-part.cc b/googletest/src/gtest-test-part.cc index 178317a6..9c5bcc6b 100644 --- a/googletest/src/gtest-test-part.cc +++ b/googletest/src/gtest-test-part.cc @@ -31,6 +31,7 @@ // 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 +47,7 @@ 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 -- cgit v1.2.3