Skip to content

Commit

Permalink
test databuf::forceoverread
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Oct 31, 2024
1 parent d3fadf6 commit 529fac6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/testutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,15 @@ namespace
assert(d.check(3) == true);
}

void test_databuf_forceoverread()
{
std::printf("Testing databuf<>::overwrote\n");
std::array<int, 4> buf;
databuf<int> d(buf.data(),4);
d.forceoverread();
assert(d.overread() == true);
}

void test_stream_overloadable()
{
std::printf("Testing virtual overloadable std::stream methods:\ntell\nrawtell\nseek\nread\nwrite\nflush\ngetcrc\n");
Expand Down Expand Up @@ -674,5 +683,6 @@ testing tools functionality\n\
test_databuf_empty();
test_databuf_remaining();
test_databuf_check();
test_databuf_forceoverread();
test_stream_overloadable();
}

0 comments on commit 529fac6

Please sign in to comment.