MCPcopy Create free account
hub / github.com/catchorg/Catch2 / activateImpl

Method activateImpl

extras/catch_amalgamated.cpp:5247–5259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5245 }
5246
5247 void activateImpl() override {
5248 // We flush before starting redirect, to ensure that we do
5249 // not capture the end of message sent before activation.
5250 flushEverything();
5251
5252 int ret;
5253 ret = dup2( fileno( m_outFile.getFile() ), fileno( stdout ) );
5254 CATCH_ENFORCE( ret >= 0,
5255 "dup2 to stdout has failed, errno: " << errno );
5256 ret = dup2( fileno( m_errFile.getFile() ), fileno( stderr ) );
5257 CATCH_ENFORCE( ret >= 0,
5258 "dup2 to stderr has failed, errno: " << errno );
5259 }
5260 void deactivateImpl() override {
5261 // We flush before ending redirect, to ensure that we
5262 // capture all messages sent while the redirect was active.

Callers

nothing calls this directly

Calls 1

getFileMethod · 0.45

Tested by

no test coverage detected