diff options
| -rw-r--r-- | googlemock/src/gmock-spec-builders.cc | 6 | ||||
| -rw-r--r-- | googletest/src/gtest-test-part.cc | 6 | 
2 files changed, 10 insertions, 2 deletions
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index f9d34345..81ea9894 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -36,14 +36,17 @@  #include "gmock/gmock-spec-builders.h"  #include <stdlib.h> +  #include <iostream>  // NOLINT  #include <map>  #include <memory>  #include <set>  #include <string>  #include <vector> +  #include "gmock/gmock.h"  #include "gtest/gtest.h" +#include "gtest/internal/gtest-port.h"  #if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC  # include <unistd.h>  // NOLINT @@ -70,7 +73,8 @@ GTEST_API_ void LogWithLocation(testing::internal::LogSeverity severity,                                  const char* file, int line,                                  const std::string& message) {    ::std::ostringstream s; -  s << file << ":" << line << ": " << message << ::std::endl; +  s << internal::FormatFileLocation(file, line) << " " << message +    << ::std::endl;    Log(severity, s.str(), 0);  } 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  | 
