Skip to content

Commit 9c97724

Browse files
committed
Tweaks.
1 parent 5efb8cd commit 9c97724

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/test/java/com/dannemann/stringcompressor/FiveBitAsciiCompressorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ void notAsciiCharCompressTest() {
8080
AsciiCompressor compressor = new FiveBitAsciiCompressor(true);
8181
CharacterNotSupportedException e = assertThrows(
8282
CharacterNotSupportedException.class, () -> compressor.compress(new byte[]{(byte) 'Ç'}));
83-
assertEquals("Only ASCII characters are supported. Invalid 'ᅦ' (code point -57) in \"Ç\"", e.getMessage());
83+
assertEquals("Only ASCII characters are supported. Invalid 'ᅦ' with code point -57 in string (maybe incomplete): \"Ç\"", e.getMessage());
8484
}
8585

8686
@Test
8787
void invalidCharCompressTest() {
8888
AsciiCompressor compressor = new FiveBitAsciiCompressor(true);
8989
CharacterNotSupportedException e = assertThrows(
9090
CharacterNotSupportedException.class, () -> compressor.compress(new byte[]{'9'}));
91-
assertEquals("Character '9' (code point 57) is not defined in the supported characters array. String: \"9\"", e.getMessage());
91+
assertEquals("Character '9' with code point 57 is not defined in the supported characters array. Source string is (maybe incomplete): \"9\"", e.getMessage());
9292
}
9393

9494
@Test

src/test/java/com/dannemann/stringcompressor/FourBitAsciiCompressorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ void notAsciiCharCompressTest() {
7171
AsciiCompressor compressor = new FourBitAsciiCompressor(true);
7272
CharacterNotSupportedException e = assertThrows(
7373
CharacterNotSupportedException.class, () -> compressor.compress(new byte[]{(byte) 'Ç'}));
74-
assertEquals("Only ASCII characters are supported. Invalid 'ᅦ' (code point -57) in \"Ç\"", e.getMessage());
74+
assertEquals("Only ASCII characters are supported. Invalid 'ᅦ' with code point -57 in string (maybe incomplete): \"Ç\"", e.getMessage());
7575
}
7676

7777
@Test
7878
void invalidCharCompressTest() {
7979
AsciiCompressor compressor = new FourBitAsciiCompressor(true);
8080
CharacterNotSupportedException e = assertThrows(
8181
CharacterNotSupportedException.class, () -> compressor.compress(new byte[]{'Z'}));
82-
assertEquals("Character 'Z' (code point 90) is not defined in the supported characters array. String: \"Z\"", e.getMessage());
82+
assertEquals("Character 'Z' with code point 90 is not defined in the supported characters array. Source string is (maybe incomplete): \"Z\"", e.getMessage());
8383
}
8484

8585
@Test

src/test/java/com/dannemann/stringcompressor/SixBitAsciiCompressorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ void notAsciiCharCompressTest() {
8080
AsciiCompressor compressor = new SixBitAsciiCompressor(true);
8181
CharacterNotSupportedException e = assertThrows(
8282
CharacterNotSupportedException.class, () -> compressor.compress(new byte[]{(byte) 'Ç'}));
83-
assertEquals("Only ASCII characters are supported. Invalid 'ᅦ' (code point -57) in \"Ç\"", e.getMessage());
83+
assertEquals("Only ASCII characters are supported. Invalid 'ᅦ' with code point -57 in string (maybe incomplete): \"Ç\"", e.getMessage());
8484
}
8585

8686
@Test
8787
void invalidCharCompressTest() {
8888
AsciiCompressor compressor = new SixBitAsciiCompressor(true);
8989
CharacterNotSupportedException e = assertThrows(
9090
CharacterNotSupportedException.class, () -> compressor.compress(new byte[]{'|'}));
91-
assertEquals("Character '|' (code point 124) is not defined in the supported characters array. String: \"|\"", e.getMessage());
91+
assertEquals("Character '|' with code point 124 is not defined in the supported characters array. Source string is (maybe incomplete): \"|\"", e.getMessage());
9292
}
9393

9494
@Test

0 commit comments

Comments
 (0)