()
| 37 | public class TestZstd { |
| 38 | |
| 39 | @Test |
| 40 | public void testNoOverflow() throws Exception { |
| 41 | ByteBuffer in = ByteBuffer.allocate(10); |
| 42 | ByteBuffer out = ByteBuffer.allocate(10); |
| 43 | ByteBuffer jniOut = ByteBuffer.allocate(10); |
| 44 | in.put(new byte[]{1, 2, 3, 4, 5, 6, 7, 10}); |
| 45 | in.flip(); |
| 46 | CompressionCodec codec = new AircompressorCodec( |
| 47 | CompressionKind.ZSTD, new ZstdCompressor(), new ZstdDecompressor()); |
| 48 | assertFalse(codec.compress(in, out, null, |
| 49 | codec.getDefaultOptions())); |
| 50 | CompressionCodec zstdCodec = new ZstdCodec(); |
| 51 | assertFalse(zstdCodec.compress(in, jniOut, null, |
| 52 | zstdCodec.getDefaultOptions())); |
| 53 | } |
| 54 | |
| 55 | @Test |
| 56 | public void testCorrupt() throws Exception { |
nothing calls this directly
no test coverage detected