Skip to content

Commit

Permalink
OpenSMT: improve API test, fail correctly on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
kfriedberger committed Oct 17, 2023
1 parent 0a55472 commit 45cb3e0
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import com.google.common.collect.ImmutableList;
import java.util.Arrays;
import org.junit.AssumptionViolatedException;
import org.junit.BeforeClass;
import org.junit.Test;
import org.sosy_lab.common.NativeLibraries;
import org.sosy_lab.java_smt.solvers.opensmt.api.ArithLogic;
Expand All @@ -36,9 +38,15 @@
import org.sosy_lab.java_smt.solvers.opensmt.api.sstat;

public class OpenSmtNativeAPITest {
static {
NativeLibraries.loadLibrary("opensmt");
NativeLibraries.loadLibrary("opensmtjava");

@BeforeClass
public static void load() {
try {
NativeLibraries.loadLibrary("opensmt");
NativeLibraries.loadLibrary("opensmtjava");
} catch (UnsatisfiedLinkError e) {
throw new AssumptionViolatedException("OpenSMT is not available", e);
}
}

/** Return free variables. */
Expand Down

0 comments on commit 45cb3e0

Please sign in to comment.