@@ -82,14 +82,11 @@ void testInvalidCompressedData() {
8282 // Test that decompressing with an invalid code throws IllegalArgumentException
8383 // Create a list with a code that doesn't exist in the dictionary
8484 List <Integer > invalidCompressed = new ArrayList <>();
85- invalidCompressed .add (65 ); // 'A' - valid
85+ invalidCompressed .add (65 ); // 'A' - valid
8686 invalidCompressed .add (999 ); // Invalid code (not in dictionary)
8787
8888 // This should throw IllegalArgumentException with message "Bad compressed k: 999"
89- IllegalArgumentException exception = assertThrows (
90- IllegalArgumentException .class ,
91- () -> LZW .decompress (invalidCompressed )
92- );
89+ IllegalArgumentException exception = assertThrows (IllegalArgumentException .class , () -> LZW .decompress (invalidCompressed ));
9390
9491 assertTrue (exception .getMessage ().contains ("Bad compressed k: 999" ));
9592 }
@@ -98,10 +95,10 @@ void testInvalidCompressedData() {
9895 void testDecompressionWithGapInDictionary () {
9996 // Test with codes that skip dictionary entries
10097 List <Integer > invalidCompressed = new ArrayList <>();
101- invalidCompressed .add (84 ); // 'T' - valid
102- invalidCompressed .add (500 ); // Way beyond current dictionary size
98+ invalidCompressed .add (84 ); // 'T' - valid
99+ invalidCompressed .add (500 ); // Way beyond current dictionary size
103100
104101 // This should throw IllegalArgumentException
105102 assertThrows (IllegalArgumentException .class , () -> LZW .decompress (invalidCompressed ));
106103 }
107- }
104+ }
0 commit comments