Prettify JNI stuff.

This commit is contained in:
Andrew Steinborn
2019-01-11 14:13:13 -05:00
parent 1ddeb85f60
commit 9daa6c3a64
9 changed files with 87 additions and 76 deletions

View File

@@ -1,5 +1,6 @@
package com.velocitypowered.natives.compression;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.condition.OS.LINUX;
@@ -28,6 +29,12 @@ class VelocityCompressorTest {
new Random(1).nextBytes(TEST_DATA);
}
@Test
@EnabledOnOs({MAC, LINUX})
void sanityCheckNative() {
assertThrows(IllegalArgumentException.class, () -> Natives.compress.get().create(-42));
}
@Test
@EnabledOnOs({MAC, LINUX})
void nativeIntegrityCheck() throws DataFormatException {