Gromacs
2021-beta2-UNCHECKED
|
#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 char *filename) override |
Returns a stream to use for output to a file at a given path. More... | |
Public Member Functions inherited from gmx::IFileOutputRedirector | |
TextOutputStreamPointer | openTextOutputFile (const std::string &filename) |
Convenience method to open a stream using an std::string path. | |
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.