From c2021584ccd0147d3b8b7c0a5dcef8cb57612e5b Mon Sep 17 00:00:00 2001 From: nhz2 Date: Wed, 28 Aug 2024 01:23:02 -0400 Subject: [PATCH] Add comments for a test --- test/test_errors.jl | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/test_errors.jl b/test/test_errors.jl index e848ea2..633df1b 100644 --- a/test/test_errors.jl +++ b/test/test_errors.jl @@ -232,10 +232,9 @@ end @test fill(0x8F, 1+3+0xFFFF) == de64compress(bitvector_to_bytes(Bool[ bits_dynamic_huffman_header(); [1,0,1,1,1,1,1,1,]; # lit 8F - [1,1,0,0,0,1,0,1,]; - bit_digits(0xFFFF, 16); - [0,0,0,0,0,]; - [0,0,0,0,0,0,0,]; + [1,1,0,0,0,1,0,1,]; bit_digits(0xFFFF, 16); # length of 65538 + [0,0,0,0,0,]; # distance of 1 + [0,0,0,0,0,0,0,]; # end of block ])) @test_throws DecompressionError("cannot read before beginning of out buffer") de64compress(bitvector_to_bytes(Bool[ bits_dynamic_huffman_header(); @@ -270,14 +269,11 @@ end @test fill(0x8F, 2^16 + 2^16+2) == de64compress(bitvector_to_bytes(Bool[ bits_dynamic_huffman_header(); [1,0,1,1,1,1,1,1,]; # lit 8F - [1,1,0,0,0,1,0,1,]; - bit_digits(0xFFFF-3, 16); - [0,0,0,0,0,]; - [1,1,0,0,0,1,0,1,]; - bit_digits(0xFFFF, 16); - [1,1,1,1,1,]; - bit_digits(0x3FFF,14); - [0,0,0,0,0,0,0,]; + [1,1,0,0,0,1,0,1,]; bit_digits(0xFFFF-3, 16); # length of 65535 + [0,0,0,0,0,]; # distance of 1 + [1,1,0,0,0,1,0,1,]; bit_digits(0xFFFF, 16); # length of 65538 + [1,1,1,1,1,]; bit_digits(0x3FFF,14); # distance of 65536 + [0,0,0,0,0,0,0,];# end of block ])) @test_throws DecompressionError("cannot read before beginning of out buffer") de64compress(bitvector_to_bytes(Bool[ bits_dynamic_huffman_header();