| 9639 | } |
| 9640 | |
| 9641 | OutputRedirect::~OutputRedirect() { |
| 9642 | Catch::cout() << std::flush; |
| 9643 | fflush(stdout); |
| 9644 | // Since we support overriding these streams, we flush cerr |
| 9645 | // even though std::cerr is unbuffered |
| 9646 | Catch::cerr() << std::flush; |
| 9647 | Catch::clog() << std::flush; |
| 9648 | fflush(stderr); |
| 9649 | |
| 9650 | dup2(m_originalStdout, 1); |
| 9651 | dup2(m_originalStderr, 2); |
| 9652 | |
| 9653 | m_stdoutDest += m_stdoutFile.getContents(); |
| 9654 | m_stderrDest += m_stderrFile.getContents(); |
| 9655 | } |
| 9656 | |
| 9657 | #endif // CATCH_CONFIG_NEW_CAPTURE |
| 9658 |
nothing calls this directly
no test coverage detected