mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
Everywhere: Remove unintentional partial stream reads and writes
This commit is contained in:
parent
26516ee160
commit
ae51c1821c
44 changed files with 109 additions and 192 deletions
|
@ -98,8 +98,7 @@ TEST_CASE(long_streams)
|
|||
u8 bytes[64] = {};
|
||||
constexpr auto test_view = "Well, hello friends"sv;
|
||||
FixedMemoryStream stream(Bytes { bytes, sizeof(bytes) });
|
||||
// FIXME: This should write the entire span.
|
||||
MUST(stream.write_some(test_view.bytes()));
|
||||
MUST(stream.write_until_depleted(test_view.bytes()));
|
||||
MUST(stream.seek(0));
|
||||
|
||||
auto string = MUST(String::from_stream(stream, test_view.length()));
|
||||
|
@ -111,8 +110,7 @@ TEST_CASE(long_streams)
|
|||
|
||||
{
|
||||
AllocatingMemoryStream stream;
|
||||
// FIXME: This should write the entire span.
|
||||
MUST(stream.write_some(("abc"sv).bytes()));
|
||||
MUST(stream.write_until_depleted(("abc"sv).bytes()));
|
||||
|
||||
auto string = MUST(String::from_stream(stream, 3u));
|
||||
|
||||
|
@ -123,8 +121,7 @@ TEST_CASE(long_streams)
|
|||
|
||||
{
|
||||
AllocatingMemoryStream stream;
|
||||
// FIXME: This should write the entire span.
|
||||
MUST(stream.write_some(("0123456789"sv).bytes()));
|
||||
MUST(stream.write_until_depleted(("0123456789"sv).bytes()));
|
||||
|
||||
auto string = MUST(String::from_stream(stream, 9u));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue