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

Function FormatDeathTestOutput

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

8128// This makes distinguishing death test output lines from regular log lines
8129// much easier.
8130static ::std::string FormatDeathTestOutput(const ::std::string& output) {
8131 ::std::string ret;
8132 for (size_t at = 0; ; ) {
8133 const size_t line_end = output.find('\n', at);
8134 ret += "[ DEATH ] ";
8135 if (line_end == ::std::string::npos) {
8136 ret += output.substr(at);
8137 break;
8138 }
8139 ret += output.substr(at, line_end + 1 - at);
8140 at = line_end + 1;
8141 }
8142 return ret;
8143}
8144
8145// Assesses the success or failure of a death test, using both private
8146// members which have previously been set, and one argument:

Callers 1

PassedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected