summaryrefslogtreecommitdiff
path: root/test/io_test_helper.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-09-10 22:12:22 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-09-10 22:12:22 +0200
commit32e14551a90e85000e41b3f0445d34d58a1431e4 (patch)
tree912c1e50b93b501446b1b179ee2a3e93586fb854 /test/io_test_helper.hh
parentcf99d0c865474105c14b2348fdbd1c83d87d5a29 (diff)
Add unicode general category lookup
Generate the lookup tables from UnicodeData.txt, do to that, add gen_ugc, which uses csv, buffers, line, io and other modules to do the job.
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..ce191cf
--- /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