psevestre 3dddb550b6 [BAEL-4204] JNA (#10113)
* [BAEL-4203] JNA

* [BAEL-4203] JNA
2020-10-01 13:13:15 -07:00

19 lines
408 B
Java

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);
}
}