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

LibCore: Rename Stream::read_all to read_until_eof

This generally seems like a better name, especially if we somehow also
need a better name for "read the entire buffer, but not the entire file"
somewhere down the line.
This commit is contained in:
Tim Schumacher 2022-12-11 17:49:00 +01:00 committed by Andreas Kling
parent 5061a905ff
commit ed4c2f2f8e
65 changed files with 88 additions and 88 deletions

View file

@ -19,13 +19,13 @@ static void run_test(StringView const file_name)
#endif
auto cmp_file = MUST(Core::Stream::File::open(path, Core::Stream::OpenMode::Read));
auto cmp_data = MUST(cmp_file->read_all());
auto cmp_data = MUST(cmp_file->read_until_eof());
DeprecatedString path_compressed = DeprecatedString::formatted("{}.br", path);
auto file = MUST(Core::Stream::File::open(path_compressed, Core::Stream::OpenMode::Read));
auto brotli_stream = Compress::BrotliDecompressionStream { *file };
auto data = MUST(brotli_stream.read_all());
auto data = MUST(brotli_stream.read_until_eof());
EXPECT_EQ(data, cmp_data);
}