mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:37:44 +00:00
AK: Remove the fallible constructor from LittleEndianInputBitStream
This commit is contained in:
parent
fa09152e23
commit
261d62438f
4 changed files with 18 additions and 23 deletions
|
@ -29,10 +29,10 @@ TEST_CASE(canonical_code_simple)
|
|||
|
||||
auto const huffman = Compress::CanonicalCode::from_bytes(code).value();
|
||||
auto memory_stream = MUST(FixedMemoryStream::construct(input));
|
||||
auto bit_stream = MUST(LittleEndianInputBitStream::construct(move(memory_stream)));
|
||||
LittleEndianInputBitStream bit_stream { move(memory_stream) };
|
||||
|
||||
for (size_t idx = 0; idx < 9; ++idx)
|
||||
EXPECT_EQ(MUST(huffman.read_symbol(*bit_stream)), output[idx]);
|
||||
EXPECT_EQ(MUST(huffman.read_symbol(bit_stream)), output[idx]);
|
||||
}
|
||||
|
||||
TEST_CASE(canonical_code_complex)
|
||||
|
@ -49,10 +49,10 @@ TEST_CASE(canonical_code_complex)
|
|||
|
||||
auto const huffman = Compress::CanonicalCode::from_bytes(code).value();
|
||||
auto memory_stream = MUST(FixedMemoryStream::construct(input));
|
||||
auto bit_stream = MUST(LittleEndianInputBitStream::construct(move(memory_stream)));
|
||||
LittleEndianInputBitStream bit_stream { move(memory_stream) };
|
||||
|
||||
for (size_t idx = 0; idx < 12; ++idx)
|
||||
EXPECT_EQ(MUST(huffman.read_symbol(*bit_stream)), output[idx]);
|
||||
EXPECT_EQ(MUST(huffman.read_symbol(bit_stream)), output[idx]);
|
||||
}
|
||||
|
||||
TEST_CASE(deflate_decompress_compressed_block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue