mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Move Handle
from LibCore
and name it MaybeOwned
The new name should make it abundantly clear what it does.
This commit is contained in:
parent
5fa590de71
commit
5f2ea31816
Notes:
sideshowbarker
2024-07-17 04:49:48 +09:00
Author: https://github.com/timschumi
Commit: 5f2ea31816
Pull-request: https://github.com/SerenityOS/serenity/pull/17173
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/alimpfard
16 changed files with 115 additions and 92 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <AK/MaybeOwned.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/BitStream.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
|
@ -726,8 +727,8 @@ TEST_CASE(little_endian_bit_stream_input_output_match)
|
|||
|
||||
// Note: The bit stream only ever reads from/writes to the underlying stream in one byte chunks,
|
||||
// so testing with sizes that will not trigger a write will yield unexpected results.
|
||||
auto bit_write_stream = MUST(Core::Stream::LittleEndianOutputBitStream::construct(Core::Stream::Handle<Core::Stream::Stream>(*memory_stream)));
|
||||
auto bit_read_stream = MUST(Core::Stream::LittleEndianInputBitStream::construct(Core::Stream::Handle<Core::Stream::Stream>(*memory_stream)));
|
||||
auto bit_write_stream = MUST(Core::Stream::LittleEndianOutputBitStream::construct(MaybeOwned<Core::Stream::Stream>(*memory_stream)));
|
||||
auto bit_read_stream = MUST(Core::Stream::LittleEndianInputBitStream::construct(MaybeOwned<Core::Stream::Stream>(*memory_stream)));
|
||||
|
||||
// Test two mirrored chunks of a fully mirrored pattern to check that we are not dropping bits.
|
||||
{
|
||||
|
@ -782,8 +783,8 @@ TEST_CASE(big_endian_bit_stream_input_output_match)
|
|||
|
||||
// Note: The bit stream only ever reads from/writes to the underlying stream in one byte chunks,
|
||||
// so testing with sizes that will not trigger a write will yield unexpected results.
|
||||
auto bit_write_stream = MUST(Core::Stream::BigEndianOutputBitStream::construct(Core::Stream::Handle<Core::Stream::Stream>(*memory_stream)));
|
||||
auto bit_read_stream = MUST(Core::Stream::BigEndianInputBitStream::construct(Core::Stream::Handle<Core::Stream::Stream>(*memory_stream)));
|
||||
auto bit_write_stream = MUST(Core::Stream::BigEndianOutputBitStream::construct(MaybeOwned<Core::Stream::Stream>(*memory_stream)));
|
||||
auto bit_read_stream = MUST(Core::Stream::BigEndianInputBitStream::construct(MaybeOwned<Core::Stream::Stream>(*memory_stream)));
|
||||
|
||||
// Test two mirrored chunks of a fully mirrored pattern to check that we are not dropping bits.
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue