27 for (
size_t offset{0}; offset <
target.size();) {
34 for (
size_t test{0}; test < 100; ++test) {
35 const size_t write_size{1 + m_rng.randrange(100U)};
36 const std::vector original{m_rng.randbytes<std::byte>(
write_size)};
43 for (
size_t i{0}; i < original.size(); ++i) {
93 fs::path
xor_path{m_args.GetDataDirBase() /
"test_xor.bin"};
95 const std::vector<uint8_t>
test1{1, 2, 3};
96 const std::vector<uint8_t>
test2{4, 5};
110 const char* mode =
"wb";
112 const char* mode =
"wbx";
122 std::vector<std::byte>
raw(7);
141 std::vector<std::byte>
read2;
157 unsigned char bytes[] = {3, 4, 5, 6};
158 std::vector<unsigned char> vch;
165 BOOST_CHECK((vch == std::vector<unsigned char>{{1, 2}}));
167 BOOST_CHECK((vch == std::vector<unsigned char>{{1, 2}}));
171 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2}}));
173 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2}}));
178 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2, 0}}));
180 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2, 0}}));
185 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 1, 2}}));
187 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 1, 2}}));
192 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 0, 1, 2}}));
194 BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 0, 1, 2}}));
198 BOOST_CHECK((vch == std::vector<unsigned char>{{3, 4, 5, 6}}));
200 BOOST_CHECK((vch == std::vector<unsigned char>{{3, 4, 5, 6}}));
205 BOOST_CHECK((vch == std::vector<unsigned char>{{8, 8, 1, 3, 4, 5, 6, 2}}));
207 BOOST_CHECK((vch == std::vector<unsigned char>{{8, 8, 1, 3, 4, 5, 6, 2}}));