Gromacs  2021-beta2-UNCHECKED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::test::TestFileOutputRedirector Class Reference

#include <testutils/testfileredirector.h>

+ Inheritance diagram for gmx::test::TestFileOutputRedirector:
+ Collaboration diagram for gmx::test::TestFileOutputRedirector:

Description

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...
 
TextOutputStreamstandardOutput () 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.
 

Member Function Documentation

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.

TextOutputStreamPointer gmx::test::TestFileOutputRedirector::openTextOutputFile ( const char *  filename)
overridevirtual

Returns a stream to use for output to a file at a given path.

Parameters
[in]filenameRequested file name.

Implements gmx::IFileOutputRedirector.


The documentation for this class was generated from the following files: