summaryrefslogtreecommitdiff
path: root/test/io_test_helper.hh
blob: ce191cf0a49779160c108f274a93bd7ef205703f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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