MCPcopy Create free account
hub / github.com/apache/orc / testNoOverflow

Method testNoOverflow

java/core/src/test/org/apache/orc/impl/TestZstd.java:39–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37public 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 {

Callers

nothing calls this directly

Calls 6

compressMethod · 0.95
getDefaultOptionsMethod · 0.95
compressMethod · 0.95
getDefaultOptionsMethod · 0.95
putMethod · 0.80
flipMethod · 0.80

Tested by

no test coverage detected