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

#include <testutils/stdiohelper.h>

Description

Helper class for tests where code reads directly from stdin.

Any method in this class may throw std::bad_alloc if out of memory.

Public Member Functions

 StdioTestHelper (TestFileManager *fileManager)
 Creates a helper using the given file manager.
 
void redirectStringToStdin (const char *theString)
 Accepts a string as input, writes it to a temporary file and then reopens stdin to read the contents of that string. More...
 

Member Function Documentation

void gmx::test::StdioTestHelper::redirectStringToStdin ( const char *  theString)

Accepts a string as input, writes it to a temporary file and then reopens stdin to read the contents of that string.

Exceptions
FileIOErrorwhen the freopen() fails

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