Starts capturing an output stream (stdout/stderr).
| 9669 | |
| 9670 | // Starts capturing an output stream (stdout/stderr). |
| 9671 | void 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. |
| 9680 | std::string GetCapturedStream(CapturedStream** captured_stream) { |
no outgoing calls
no test coverage detected