| 8152 | } |
| 8153 | |
| 8154 | OutputRedirect::~OutputRedirect() { |
| 8155 | Catch::cout() << std::flush; |
| 8156 | fflush(stdout); |
| 8157 | // Since we support overriding these streams, we flush cerr |
| 8158 | // even though std::cerr is unbuffered |
| 8159 | Catch::cerr() << std::flush; |
| 8160 | Catch::clog() << std::flush; |
| 8161 | fflush(stderr); |
| 8162 | |
| 8163 | dup2(m_originalStdout, 1); |
| 8164 | dup2(m_originalStderr, 2); |
| 8165 | |
| 8166 | m_stdoutDest += m_stdoutFile.getContents(); |
| 8167 | m_stderrDest += m_stderrFile.getContents(); |
| 8168 | } |
| 8169 | |
| 8170 | } // namespace Catch |
| 8171 |
nothing calls this directly
no test coverage detected