diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-08-08 16:14:50 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-08-08 16:15:07 +0100 |
commit | bdb5c897087d3588f456c020b3633cbd694003da (patch) | |
tree | ef09420dad64a438e097645850b8596eebe28a97 /test/helpers.cpp | |
parent | Simplify some bits with concepts (diff) | |
download | mygrate-bdb5c897087d3588f456c020b3633cbd694003da.tar.bz2 mygrate-bdb5c897087d3588f456c020b3633cbd694003da.tar.xz mygrate-bdb5c897087d3588f456c020b3633cbd694003da.zip |
Tests, fixes, improvements to WritePqCopyStream
Diffstat (limited to 'test/helpers.cpp')
-rw-r--r-- | test/helpers.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/helpers.cpp b/test/helpers.cpp new file mode 100644 index 0000000..f4fc030 --- /dev/null +++ b/test/helpers.cpp @@ -0,0 +1,15 @@ +#include "helpers.h" + +MemStream::MemStream() : out {nullptr}, len {}, s {open_memstream(&out, &len)} { } + +MemStream::~MemStream() +{ + fclose(s); + free(out); +} + +void +MemStream::flush() +{ + fflush(s); +} |