|
Gromacs
2026.0-dev-20251105-11eb1db
|
#include <testutils/include/testutils/posixmemstream.h>
Open an in-memory string stream that works like a FILE* handle.
This permits writing tests based on the contents of that string after the stream has closed.
When open_memstream() is not supported, provides a minimal functional implementation that writes to stdout. This lets us have test coverage of legacy code on POSIX-compliant systems, which is much better than nothing.
Public Member Functions | |
| FILE * | stream () |
| Get the stream. | |
| void | closeStream () |
| Close the string stream (if supported) | |
| std::string | toString () |
| Close the stream and return a string. More... | |
Static Public Member Functions | |
| static bool | canCheckBufferContents () |
| Return whether checking the buffer contents is supported. | |
| std::string gmx::test::PosixMemstream::toString | ( | ) |
Close the stream and return a string.
1.8.5