()
| 49 | } |
| 50 | |
| 51 | @Test |
| 52 | public void testCorrupt() throws Exception { |
| 53 | ByteBuffer buf = ByteBuffer.allocate(1000); |
| 54 | buf.put(new byte[]{127,-128,0,99,98,-1}); |
| 55 | buf.flip(); |
| 56 | CompressionCodec codec = new ZlibCodec(); |
| 57 | ByteBuffer out = ByteBuffer.allocate(1000); |
| 58 | try { |
| 59 | codec.decompress(buf, out); |
| 60 | fail(); |
| 61 | } catch (IOException ioe) { |
| 62 | // EXPECTED |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | @Test |
| 67 | public void testCorruptZlibFile() { |
nothing calls this directly
no test coverage detected