summaryrefslogtreecommitdiff
path: root/test/io_test_helper.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-10-07 09:12:22 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-10-07 09:13:15 +0200
commitc87f9627efc8b612eb9b000acfcc6731cad15765 (patch)
tree34eb4b9e70a51c2f3db3a97c2aef31ba0b139ec9 /test/io_test_helper.hh
Initial commit
Diffstat (limited to 'test/io_test_helper.hh')
-rw-r--r--test/io_test_helper.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/io_test_helper.hh b/test/io_test_helper.hh
new file mode 100644
index 0000000..b99b8fa
--- /dev/null
+++ b/test/io_test_helper.hh
@@ -0,0 +1,18 @@
+#ifndef IO_TEST_HELPER_HH
+#define IO_TEST_HELPER_HH
+
+#include "io.hh" // IWYU pragma: export
+
+#include <cstddef>
+#include <memory>
+
+[[nodiscard]]
+std::unique_ptr<io::Reader> io_make_breaking(
+ std::unique_ptr<io::Reader> reader, size_t offset = 0,
+ io::ReadError error = io::ReadError::Error);
+
+[[nodiscard]]
+std::unique_ptr<io::Reader> io_make_max_block(
+ std::unique_ptr<io::Reader> reader, size_t max_block_size);
+
+#endif // IO_TEST_HELPER_HH