MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / FormatDeathTestOutput

Function FormatDeathTestOutput

rtpose_wrapper/src/gtest/gtest-all.cpp:6649–6662  ·  view source on GitHub ↗

Returns an indented copy of stderr output for a death test. This makes distinguishing death test output lines from regular log lines much easier.

Source from the content-addressed store, hash-verified

6647// This makes distinguishing death test output lines from regular log lines
6648// much easier.
6649static ::std::string FormatDeathTestOutput(const ::std::string& output) {
6650 ::std::string ret;
6651 for (size_t at = 0; ; ) {
6652 const size_t line_end = output.find('\n', at);
6653 ret += "[ DEATH ] ";
6654 if (line_end == ::std::string::npos) {
6655 ret += output.substr(at);
6656 break;
6657 }
6658 ret += output.substr(at, line_end + 1 - at);
6659 at = line_end + 1;
6660 }
6661 return ret;
6662}
6663
6664// Assesses the success or failure of a death test, using both private
6665// members which have previously been set, and one argument:

Callers 1

PassedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected