Made project more solid, made deserialiser do incomplete buffer read, made file_reader non copyable, updated test.cpp

This commit is contained in:
Luna 2025-07-03 19:12:21 +02:00
parent ceb65deca8
commit 02b593c237
3 changed files with 75 additions and 12 deletions

View file

@ -11,8 +11,18 @@ int main()
t.allocated = 0;
t.size = 10;
auto tup = std::make_tuple(t);
auto tup2 = std::make_tuple(t);
auto tup3 = std::make_tuple(t);
auto res = a.read_from_tuple(tup);
auto re2 = a.read_from_tuple(tup2);
auto re3 = a.read_from_tuple(tup3);
if (res.second == READ_CORRECT)
std::println("{}", std::get<0>(tup).data);
if (re2.second == READ_CORRECT)
std::println("{}", std::get<0>(tup2).data);
if (re3.second == READ_CORRECT)
std::println("{}", std::get<0>(tup3).data);
if (re3.second == READ_INCOMPLETE)
std::println("incomplete read with size {} {}", re3.first, std::get<0>(tup3).data);
}