JNI for test coverage #3965

This commit is contained in:
rusefillc 2022-03-01 00:27:13 -05:00
parent 825a8d38ee
commit bb14743a58
1 changed files with 8 additions and 3 deletions

View File

@ -12,12 +12,17 @@ public class JniSandbox {
private static final String LIBNAME = "lib_rusefi_test";
public static void main(String[] args) {
String[] list = new File(".").list((dir, name) -> name.startsWith(LIBNAME));
System.out.println(" " + Arrays.toString(list));
System.loadLibrary(LIBNAME);
loadLibrary();
EngineLogic engineLogic = new EngineLogic();
System.out.println(engineLogic.getVersion());
engineLogic.setConfiguration(new byte[4], 24, 14);
}
public static void loadLibrary() {
String libPath = System.getProperty("java.library.path");
String[] list = new File(libPath).list((dir, name) -> name.startsWith(LIBNAME));
System.out.println(" " + Arrays.toString(list));
System.loadLibrary(LIBNAME);
}
}