MCPcopy Create free account
hub / github.com/BVLC/caffe / FormatCompilerIndependentFileLocation

Function FormatCompilerIndependentFileLocation

src/gtest/gtest-all.cpp:8250–8258  ·  view source on GitHub ↗

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().

Source from the content-addressed store, hash-verified

8248// Note that FormatCompilerIndependentFileLocation() does NOT append colon
8249// to the file location it produces, unlike FormatFileLocation().
8250GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
8251 const char* file, int line) {
8252 const char* const file_name = file == NULL ? kUnknownFile : file;
8253
8254 if (line < 0)
8255 return file_name;
8256 else
8257 return String::Format("%s:%d", file_name, line).c_str();
8258}
8259
8260
8261GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)

Callers 1

OutputXmlTestInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected