Starts capturing an output stream (stdout/stderr).
| 10868 | |
| 10869 | // Starts capturing an output stream (stdout/stderr). |
| 10870 | static void CaptureStream(int fd, const char* stream_name, |
| 10871 | CapturedStream** stream) { |
| 10872 | if (*stream != nullptr) { |
| 10873 | GTEST_LOG_(FATAL) << "Only one " << stream_name |
| 10874 | << " capturer can exist at a time."; |
| 10875 | } |
| 10876 | *stream = new CapturedStream(fd); |
| 10877 | } |
| 10878 | |
| 10879 | // Stops capturing the output stream and returns the captured string. |
| 10880 | static std::string GetCapturedStream(CapturedStream** captured_stream) { |
no outgoing calls
no test coverage detected