Gromacs
2021-sycl
|
#include <testutils/stdiohelper.h>
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... | |
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.
FileIOError | when the freopen() fails |