Gromacs
2026.0-dev-20241204-d69d709
|
#include <testutils/include/testutils/testfileredirector.h>
In-memory implementation of IFileOutputRedirector for tests.
This class redirects all output files to in-memory buffers, and supports checking the contents of these files using the reference data framework.
Public Member Functions | |
void | checkRedirectedFiles (TestReferenceChecker *checker) |
Checks contents of all redirected files (including stdout). More... | |
TextOutputStream & | standardOutput () override |
Returns a stream to use for stdout output. | |
TextOutputStreamPointer | openTextOutputFile (const std::filesystem::path &filename) override |
Returns a stream to use for output to a file at a given path. More... | |
void gmx::test::TestFileOutputRedirector::checkRedirectedFiles | ( | TestReferenceChecker * | checker | ) |
Checks contents of all redirected files (including stdout).
This method should not be called if the redirector will still be used for further output in the test. Behavior is not designed for checking in the middle of the test, although that could potentially be changed if necessary.
|
overridevirtual |
Returns a stream to use for output to a file at a given path.
[in] | filename | Requested file name. |
Implements gmx::IFileOutputRedirector.