MCPcopy Create free account
hub / github.com/apache/singa / FormatCompilerIndependentFileLocation

Function FormatCompilerIndependentFileLocation

test/gtest/gtest-all.cc:8684–8692  ·  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

8682// Note that FormatCompilerIndependentFileLocation() does NOT append colon
8683// to the file location it produces, unlike FormatFileLocation().
8684GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
8685 const char* file, int line) {
8686 const std::string file_name(file == NULL ? kUnknownFile : file);
8687
8688 if (line < 0)
8689 return file_name;
8690 else
8691 return file_name + ":" + StreamableToString(line);
8692}
8693
8694
8695GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)

Callers 1

OutputXmlTestInfoMethod · 0.85

Calls 1

StreamableToStringFunction · 0.85

Tested by

no test coverage detected