MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / FormatCompilerIndependentFileLocation

Function FormatCompilerIndependentFileLocation

tests/gtest/gtest-all.cc:10740–10748  ·  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

10738// Note that FormatCompilerIndependentFileLocation() does NOT append colon
10739// to the file location it produces, unlike FormatFileLocation().
10740GTEST_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
10750GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)
10751 : severity_(severity) {

Callers 2

OutputXmlTestInfoMethod · 0.85
OutputJsonTestInfoMethod · 0.85

Calls 1

StreamableToStringFunction · 0.85

Tested by

no test coverage detected