Commit edee35d7 authored by Daniel Le Berre's avatar Daniel Le Berre

A few more lines covered.

parent 382a1eff
Pipeline #3403 failed with stages
in 31 minutes and 48 seconds
......@@ -5,14 +5,17 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.sat4j.minisat.SolverFactory;
import org.sat4j.specs.ISolver;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CLITest {
@Test
public void testDecisionModeSAT() {
public void test01DecisionModeSAT() {
BasicLauncher<ISolver> launcher = new BasicLauncher<ISolver>(
SolverFactory.instance());
String[] args = { "src/test/testfiles/aim-50-yes-ok.cnf" };
......@@ -21,7 +24,7 @@ public class CLITest {
}
@Test
public void testDecisionModeUNSAT() {
public void test02DecisionModeUNSAT() {
BasicLauncher<ISolver> launcher = new BasicLauncher<ISolver>(
SolverFactory.instance());
String[] args = { "src/test/testfiles/aim-50-no-ok.cnf" };
......@@ -30,7 +33,15 @@ public class CLITest {
}
@Test
public void testDecisionModeUNSATPROOF() {
public void test04MUSLauncher() {
MUSLauncher launcher = new MUSLauncher();
String[] args = { "src/test/testfiles/aim-50-no-ok.cnf" };
launcher.run(args);
assertEquals(ExitCode.UNSATISFIABLE, launcher.getExitCode());
}
@Test
public void test05DecisionModeUNSATPROOF() {
BasicLauncher<ISolver> launcher = new BasicLauncher<ISolver>(
SolverFactory.instance());
String[] args = { "src/test/testfiles/aim-50-no-ok.cnf" };
......@@ -41,7 +52,7 @@ public class CLITest {
}
@Test
public void testDecisionModeMinOne() {
public void test06DecisionModeMinOne() {
BasicLauncher<ISolver> launcher = new BasicLauncher<ISolver>(
SolverFactory.instance());
String[] args = { "src/test/testfiles/aim-50-yes-ok.cnf" };
......@@ -51,7 +62,7 @@ public class CLITest {
}
@Test
public void testDecisionModeAllExternal() {
public void test07DecisionModeAllExternal() {
BasicLauncher<ISolver> launcher = new BasicLauncher<ISolver>(
SolverFactory.instance());
String[] args = { "src/test/testfiles/aim-50-yes-ok.cnf" };
......@@ -61,12 +72,12 @@ public class CLITest {
}
@Test
public void testDecisionModeAllInternal() {
public void test08DecisionModeAllInternal() {
BasicLauncher<ISolver> launcher = new BasicLauncher<ISolver>(
SolverFactory.instance());
String[] args = { "src/test/testfiles/aim-50-yes-ok.cnf" };
System.setProperty("all", "internal");
launcher.run(args);
assertEquals(ExitCode.OPTIMUM_FOUND, launcher.getExitCode());
assertEquals(ExitCode.SATISFIABLE, launcher.getExitCode());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment