MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / FormatCompilerIndependentFileLocation

Function FormatCompilerIndependentFileLocation

test/common/gtest/gtest.cpp:9515–9523  ·  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

9513// Note that FormatCompilerIndependentFileLocation() does NOT append colon
9514// to the file location it produces, unlike FormatFileLocation().
9515GTEST_API_ ::std::string FormatCompilerIndependentFileLocation(
9516 const char* file, int line) {
9517 const std::string file_name(file == NULL ? kUnknownFile : file);
9518
9519 if (line < 0)
9520 return file_name;
9521 else
9522 return file_name + ":" + StreamableToString(line);
9523}
9524
9525
9526GTestLog::GTestLog(GTestLogSeverity severity, const char* file, int line)

Callers 1

Calls 1

StreamableToStringFunction · 0.85

Tested by

no test coverage detected