From 6ed8f5151719fbc14ec0ac6d28a346d1f74cf2ca Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Fri, 2 Jan 2026 22:42:31 +0100 Subject: Initial commit --- test/io_test_helper.hh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/io_test_helper.hh (limited to 'test/io_test_helper.hh') diff --git a/test/io_test_helper.hh b/test/io_test_helper.hh new file mode 100644 index 0000000..eb7bbb3 --- /dev/null +++ b/test/io_test_helper.hh @@ -0,0 +1,27 @@ +#ifndef IO_TEST_HELPER_HH +#define IO_TEST_HELPER_HH + +#include "io.hh" // IWYU pragma: export + +#include +#include + +[[nodiscard]] +std::unique_ptr io_make_breaking( + std::unique_ptr reader, size_t offset = 0, + io::ReadError error = io::ReadError::Error); + +[[nodiscard]] +std::unique_ptr io_make_breaking( + std::unique_ptr writer, size_t offset = 0, + io::WriteError error = io::WriteError::Error); + +[[nodiscard]] +std::unique_ptr io_make_max_block( + std::unique_ptr reader, size_t max_block_size); + +[[nodiscard]] +std::unique_ptr io_make_max_block( + std::unique_ptr writer, size_t max_block_size); + +#endif // IO_TEST_HELPER_HH -- cgit v1.2.3-70-g09d2