(byte[] compressed, boolean expectSuccess, String expectedOutput)
| 41 | } |
| 42 | |
| 43 | private void checkSynth(byte[] compressed, boolean expectSuccess, String expectedOutput) { |
| 44 | byte[] expected = readUniBytes(expectedOutput); |
| 45 | try { |
| 46 | byte[] actual = decompress(compressed); |
| 47 | if (!expectSuccess) { |
| 48 | fail("expected to fail decoding, but succeeded"); |
| 49 | } |
| 50 | assertArrayEquals(expected, actual); |
| 51 | } catch (IOException ex) { |
| 52 | if (expectSuccess) { |
| 53 | throw new AssertionError("expected to succeed decoding, but failed", ex); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | private static String times(int count, String str) { |
| 59 | StringBuilder out = new StringBuilder(count * str.length()); |
no test coverage detected