summaryrefslogtreecommitdiff
path: root/test/io_test_helper.hh
blob: b99b8fae2f4bd66fc5b63a768a58b7cf6cd6f330 (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