summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2023-05-03 18:45:18 -0400
committerAndreas Kling <kling@serenityos.org>2023-05-09 11:18:46 +0200
commit8c34959b53b2b72122fe6d2718d5dc060ff56875 (patch)
tree8e88ecd303fddce25ffc170d297bc76762f115da /Tests
parent48b000a36cb22550e2c5314bc6c471812c963d0c (diff)
downloadserenity-8c34959b53b2b72122fe6d2718d5dc060ff56875.zip
AK: Add the `Input` word to input-only buffered streams
This concerns both `BufferedSeekable` and `BufferedFile`.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LibCore/TestLibCoreStream.cpp8
-rw-r--r--Tests/LibJS/test262-runner.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/Tests/LibCore/TestLibCoreStream.cpp b/Tests/LibCore/TestLibCoreStream.cpp
index 0a81955fa7..3ee97091a1 100644
--- a/Tests/LibCore/TestLibCoreStream.cpp
+++ b/Tests/LibCore/TestLibCoreStream.cpp
@@ -422,7 +422,7 @@ TEST_CASE(buffered_long_file_read)
{
auto maybe_file = Core::File::open("/usr/Tests/LibCore/long_lines.txt"sv, Core::File::OpenMode::Read);
EXPECT(!maybe_file.is_error());
- auto maybe_buffered_file = Core::BufferedFile::create(maybe_file.release_value());
+ auto maybe_buffered_file = Core::InputBufferedFile::create(maybe_file.release_value());
EXPECT(!maybe_buffered_file.is_error());
auto file = maybe_buffered_file.release_value();
@@ -444,7 +444,7 @@ TEST_CASE(buffered_small_file_read)
{
auto maybe_file = Core::File::open("/usr/Tests/LibCore/small.txt"sv, Core::File::OpenMode::Read);
EXPECT(!maybe_file.is_error());
- auto maybe_buffered_file = Core::BufferedFile::create(maybe_file.release_value());
+ auto maybe_buffered_file = Core::InputBufferedFile::create(maybe_file.release_value());
EXPECT(!maybe_buffered_file.is_error());
auto file = maybe_buffered_file.release_value();
@@ -472,7 +472,7 @@ TEST_CASE(buffered_file_tell_and_seek)
{
// We choose a buffer size of 12 bytes to cover half of the input file.
auto file = Core::File::open("/usr/Tests/LibCore/small.txt"sv, Core::File::OpenMode::Read).release_value();
- auto buffered_file = Core::BufferedFile::create(move(file), 12).release_value();
+ auto buffered_file = Core::InputBufferedFile::create(move(file), 12).release_value();
// Initial state.
{
@@ -562,7 +562,7 @@ TEST_CASE(buffered_file_without_newlines)
EXPECT(!file_wo_newlines->write_until_depleted(new_newlines_message.bytes()).is_error());
file_wo_newlines->close();
- auto ro_file = Core::BufferedFile::create(Core::File::open(filename, Core::File::OpenMode::Read).release_value(), new_newlines_message.length() + 1).release_value();
+ auto ro_file = Core::InputBufferedFile::create(Core::File::open(filename, Core::File::OpenMode::Read).release_value(), new_newlines_message.length() + 1).release_value();
auto maybe_can_read_line = ro_file->can_read_line();
EXPECT(!maybe_can_read_line.is_error());
diff --git a/Tests/LibJS/test262-runner.cpp b/Tests/LibJS/test262-runner.cpp
index 4747b44c94..bba6bc56af 100644
--- a/Tests/LibJS/test262-runner.cpp
+++ b/Tests/LibJS/test262-runner.cpp
@@ -695,7 +695,7 @@ int main(int argc, char** argv)
return exit_setup_input_failure;
Array<u8, 1024> input_buffer {};
- auto buffered_standard_input_or_error = Core::BufferedFile::create(standard_input_or_error.release_value());
+ auto buffered_standard_input_or_error = Core::InputBufferedFile::create(standard_input_or_error.release_value());
if (buffered_standard_input_or_error.is_error())
return exit_setup_input_failure;