[BAEL-4204] JNA (#10113)

* [BAEL-4203] JNA

* [BAEL-4203] JNA
This commit is contained in:
psevestre
2020-10-01 17:13:15 -03:00
committed by GitHub
parent 5a8f420807
commit 3dddb550b6
28 changed files with 225 additions and 16 deletions
@@ -0,0 +1,18 @@
package com.baeldung.jna;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import com.sun.jna.Native;
import com.sun.jna.Platform;
class CMathUnitTest {
@Test
void whenCallNative_thenSuccess() {
CMath lib = Native.load(Platform.isWindows() ? "msvcrt" : "c", CMath.class);
double result = lib.cosh(0);
assertEquals(1.0,result);
}
}