Gromacs  2026.0-dev-20241204-d69d709
 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/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 std::filesystem::path &filename) override
 Returns a stream to use for output to a file at a given path. More...
 

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 std::filesystem::path &  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: