diff options
author | mudathirmahgoub <mudathirmahgoub@gmail.com> | 2021-11-03 16:32:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 21:32:10 +0000 |
commit | 690a3926569a29217df5000cfb673cc407ada356 (patch) | |
tree | d7147990f2e5f8b92244ec1fbb148b6bcd5cb1c5 /src/api/java/jni/solver.cpp | |
parent | b8504ef92ef609ddeaf093299811aa8d6d6396ad (diff) |
Enable CI for Junit tests (#7436)
This PR enables CI for java tests by adding --java-bindings to ci.yml.
It also replaces the unreliable finalize method and instead uses AutoCloseable and explicit close method to clean up dynamic memory allocated by java native interface.
The PR fixes compile errors for SolverTest.java and runtime errors for Solver.defineFun.
Diffstat (limited to 'src/api/java/jni/solver.cpp')
-rw-r--r-- | src/api/java/jni/solver.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/api/java/jni/solver.cpp b/src/api/java/jni/solver.cpp index bc4d7ff43..2d775c545 100644 --- a/src/api/java/jni/solver.cpp +++ b/src/api/java/jni/solver.cpp @@ -1679,15 +1679,14 @@ JNIEXPORT jlong JNICALL Java_io_github_cvc5_api_Solver_declareSort( * Signature: (JLjava/lang/String;[JJJZ)J */ JNIEXPORT jlong JNICALL -Java_io_github_cvc5_api_Solver_defineFun__JLjava_lang_String_2_3JJJZ( - JNIEnv* env, - jobject, - jlong pointer, - jstring jSymbol, - jlongArray jVars, - jlong sortPointer, - jlong termPointer, - jboolean global) +Java_io_github_cvc5_api_Solver_defineFun(JNIEnv* env, + jobject, + jlong pointer, + jstring jSymbol, + jlongArray jVars, + jlong sortPointer, + jlong termPointer, + jboolean global) { CVC5_JAVA_API_TRY_CATCH_BEGIN; Solver* solver = reinterpret_cast<Solver*>(pointer); |