mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:57:34 +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:
parent
5061a905ff
commit
ed4c2f2f8e
65 changed files with 88 additions and 88 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ public:
|
|||
|
||||
DeprecatedString read_all()
|
||||
{
|
||||
auto all_output_or_error = m_input->read_all();
|
||||
auto all_output_or_error = m_input->read_until_eof();
|
||||
if (all_output_or_error.is_error()) {
|
||||
warnln("Got error: {} while reading runner output", all_output_or_error.error());
|
||||
return ""sv;
|
||||
|
|
|
@ -149,7 +149,7 @@ static Result<StringView, TestError> read_harness_file(StringView harness_file)
|
|||
};
|
||||
}
|
||||
|
||||
auto contents_or_error = file_or_error.value()->read_all();
|
||||
auto contents_or_error = file_or_error.value()->read_until_eof();
|
||||
if (contents_or_error.is_error()) {
|
||||
return TestError {
|
||||
NegativePhase::Harness,
|
||||
|
@ -719,7 +719,7 @@ int main(int argc, char** argv)
|
|||
static size_t strict_length = use_strict.length();
|
||||
|
||||
{
|
||||
auto contents_or_error = file->read_all();
|
||||
auto contents_or_error = file->read_until_eof();
|
||||
if (contents_or_error.is_error()) {
|
||||
warnln("Could not read contents of file: {}", path);
|
||||
return exit_read_file_failure;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue