JNI for test coverage #3965
This commit is contained in:
parent
223eb0dd16
commit
cdb3e36c02
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue