Formats a file location for compiler-independent XML output. Although this function is not platform dependent, we put it next to FormatFileLocation in order to contrast the two functions. Note that FormatCompilerIndependentFileLocation() does NOT append colon to the file location it produces, unlike FormatFileLocation().
| 10738 | // Note that FormatCompilerIndependentFileLocation() does NOT append colon |
| 10739 | // to the file location it produces, unlike FormatFileLocation(). |
| 10740 | GTEST_API_ ::std::string FormatCompilerIndependentFileLocation( |
| 10741 | const char* file, int line) { |
| 10742 | const std::string file_name(file == nullptr ? kUnknownFile : file); |
| 10743 | |
| 10744 | if (line < 0) |
| 10745 | return file_name; |
| 10746 | else |
| 10747 | return file_name + ":" + StreamableToString(line); |
| 10748 | } |
| 10749 | |
| 10750 | GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line) |
| 10751 | : severity_(severity) { |
no test coverage detected