mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
Tests: Convert LZMA and XZ tests to TRY_OR_FAIL
This is very useful for tracking down a breakage without having to add temporary dbgln manually.
This commit is contained in:
parent
5f806ec53a
commit
d4e48db1e1
2 changed files with 23 additions and 23 deletions
|
@ -51,7 +51,7 @@ TEST_CASE(specification_a_lzma_decompress)
|
|||
|
||||
auto stream = MUST(try_make<FixedMemoryStream>(compressed));
|
||||
auto decompressor = MUST(Compress::LzmaDecompressor::create_from_container(move(stream)));
|
||||
auto buffer = MUST(decompressor->read_until_eof(PAGE_SIZE));
|
||||
auto buffer = TRY_OR_FAIL(decompressor->read_until_eof(PAGE_SIZE));
|
||||
EXPECT_EQ(specification_a_txt, buffer.span());
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ TEST_CASE(specification_a_eos_lzma_decompress)
|
|||
|
||||
auto stream = MUST(try_make<FixedMemoryStream>(compressed));
|
||||
auto decompressor = MUST(Compress::LzmaDecompressor::create_from_container(move(stream)));
|
||||
auto buffer = MUST(decompressor->read_until_eof(PAGE_SIZE));
|
||||
auto buffer = TRY_OR_FAIL(decompressor->read_until_eof(PAGE_SIZE));
|
||||
EXPECT_EQ(specification_a_txt, buffer.span());
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ TEST_CASE(specification_a_eos_and_size_lzma_decompress)
|
|||
|
||||
auto stream = MUST(try_make<FixedMemoryStream>(compressed));
|
||||
auto decompressor = MUST(Compress::LzmaDecompressor::create_from_container(move(stream)));
|
||||
auto buffer = MUST(decompressor->read_until_eof(PAGE_SIZE));
|
||||
auto buffer = TRY_OR_FAIL(decompressor->read_until_eof(PAGE_SIZE));
|
||||
EXPECT_EQ(specification_a_txt, buffer.span());
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ TEST_CASE(specification_a_lp1_lc2_pb1_lzma_decompress)
|
|||
|
||||
auto stream = MUST(try_make<FixedMemoryStream>(compressed));
|
||||
auto decompressor = MUST(Compress::LzmaDecompressor::create_from_container(move(stream)));
|
||||
auto buffer = MUST(decompressor->read_until_eof(PAGE_SIZE));
|
||||
auto buffer = TRY_OR_FAIL(decompressor->read_until_eof(PAGE_SIZE));
|
||||
EXPECT_EQ(specification_a_txt, buffer.span());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue