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

Function CaptureStream

test/common/gtest/gtest.cpp:9671–9677  ·  view source on GitHub ↗

Starts capturing an output stream (stdout/stderr).

Source from the content-addressed store, hash-verified

9669
9670// Starts capturing an output stream (stdout/stderr).
9671void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) {
9672 if (*stream != NULL) {
9673 GTEST_LOG_(FATAL) << "Only one " << stream_name
9674 << " capturer can exist at a time.";
9675 }
9676 *stream = new CapturedStream(fd);
9677}
9678
9679// Stops capturing the output stream and returns the captured string.
9680std::string GetCapturedStream(CapturedStream** captured_stream) {

Callers 2

CaptureStdoutFunction · 0.85
CaptureStderrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected