1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

AK: Rename Stream::write_entire_buffer to Stream::write_until_depleted

No functional changes.
This commit is contained in:
Tim Schumacher 2023-03-01 15:37:45 +01:00 committed by Linus Groh
parent a3f73e7d85
commit ecd1862859
46 changed files with 141 additions and 141 deletions

View file

@ -29,7 +29,7 @@ TEST_CASE(allocating_memory_stream_empty)
TEST_CASE(allocating_memory_stream_offset_of)
{
AllocatingMemoryStream stream;
MUST(stream.write_entire_buffer("Well Hello Friends! :^)"sv.bytes()));
MUST(stream.write_until_depleted("Well Hello Friends! :^)"sv.bytes()));
{
auto offset = MUST(stream.offset_of(" "sv.bytes()));
@ -79,12 +79,12 @@ TEST_CASE(allocating_memory_stream_offset_of_oob)
// First, fill exactly one chunk.
for (size_t i = 0; i < 256; ++i)
MUST(stream.write_entire_buffer("AAAAAAAAAAAAAAAA"sv.bytes()));
MUST(stream.write_until_depleted("AAAAAAAAAAAAAAAA"sv.bytes()));
// Then discard it all.
MUST(stream.discard(4096));
// Now we can write into this chunk again, knowing that it's initialized to all 'A's.
MUST(stream.write_entire_buffer("Well Hello Friends! :^)"sv.bytes()));
MUST(stream.write_until_depleted("Well Hello Friends! :^)"sv.bytes()));
{
auto offset = MUST(stream.offset_of("A"sv.bytes()));