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

LibCore: Propagate errors from Stream::*_entire_buffer

This commit is contained in:
Tim Schumacher 2022-12-11 19:21:36 +01:00 committed by Andreas Kling
parent 6c7c5a6786
commit 9a3e95785e
17 changed files with 43 additions and 49 deletions

View file

@ -96,17 +96,17 @@ TEST_CASE(test_TLS_hello_handshake)
loop.quit(0);
};
if (!tls->write_entire_buffer("GET / HTTP/1.1\r\nHost: "_b)) {
if (tls->write_entire_buffer("GET / HTTP/1.1\r\nHost: "_b).is_error()) {
FAIL("write(0) failed");
return;
}
auto the_server = DEFAULT_SERVER;
if (!tls->write_entire_buffer(the_server.bytes())) {
if (tls->write_entire_buffer(the_server.bytes()).is_error()) {
FAIL("write(1) failed");
return;
}
if (!tls->write_entire_buffer("\r\nConnection : close\r\n\r\n"_b)) {
if (tls->write_entire_buffer("\r\nConnection : close\r\n\r\n"_b).is_error()) {
FAIL("write(2) failed");
return;
}