summaryrefslogtreecommitdiff
path: root/Tests/LibWeb
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-02-24 22:38:01 +0100
committerLinus Groh <mail@linusgroh.de>2023-03-13 15:16:20 +0000
commitd5871f5717579fab3c093537c44e3cd467560cdd (patch)
tree9e7e118ae5b7642f0168c5302ee74e9e483ae91c /Tests/LibWeb
parent1d5b45f7d938b15db9da9b12dc4d8b373abd6c7c (diff)
downloadserenity-d5871f5717579fab3c093537c44e3cd467560cdd.zip
AK: Rename Stream::{read,write} to Stream::{read_some,write_some}
Similar to POSIX read, the basic read and write functions of AK::Stream do not have a lower limit of how much data they read or write (apart from "none at all"). Rename the functions to "read some [data]" and "write some [data]" (with "data" being omitted, since everything here is reading and writing data) to make them sufficiently distinct from the functions that ensure to use the entire buffer (which should be the go-to function for most usages). No functional changes, just a lot of new FIXMEs.
Diffstat (limited to 'Tests/LibWeb')
-rw-r--r--Tests/LibWeb/TestHTMLTokenizer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tests/LibWeb/TestHTMLTokenizer.cpp b/Tests/LibWeb/TestHTMLTokenizer.cpp
index ba2ba76a91..a6d03186a1 100644
--- a/Tests/LibWeb/TestHTMLTokenizer.cpp
+++ b/Tests/LibWeb/TestHTMLTokenizer.cpp
@@ -211,7 +211,8 @@ TEST_CASE(regression)
auto file = MUST(Core::File::open(path, Core::File::OpenMode::Read));
auto file_size = MUST(file->size());
auto content = MUST(ByteBuffer::create_uninitialized(file_size));
- MUST(file->read(content.bytes()));
+ // FIXME: This should read the entire span.
+ MUST(file->read_some(content.bytes()));
DeprecatedString file_contents { content.bytes() };
auto tokens = run_tokenizer(file_contents);
u32 hash = hash_tokens(tokens);