| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
package org.sat4j.minisat; |
| 8 |
|
|
| 9 |
|
import junit.framework.TestSuite; |
| 10 |
|
|
| 11 |
|
import org.sat4j.specs.ISolver; |
| 12 |
|
|
| 13 |
|
|
| 14 |
|
@author |
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (15) |
Complexity: 2 |
Complexity Density: 0,56 |
|
| 19 |
|
public class GenericM2Test extends AbstractM2Test { |
| 20 |
|
|
| 21 |
|
private String solvername; |
| 22 |
|
|
| 23 |
|
private static final SolverFactory factory = SolverFactory.instance(); |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
@param |
| 27 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
| 28 |
57
|
public GenericM2Test(String arg0) {... |
| 29 |
57
|
setName("AbstractM2Test" + arg0); |
| 30 |
57
|
solvername = arg0; |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
@see |
| 37 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 38 |
57
|
@Override... |
| 39 |
|
protected ISolver createSolver() { |
| 40 |
57
|
return factory.createSolverByName(solvername); |
| 41 |
|
} |
| 42 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0,4 |
|
| 43 |
1
|
public static TestSuite suite() {... |
| 44 |
1
|
TestSuite suite = new TestSuite(); |
| 45 |
1
|
String[] names = factory.solverNames(); |
| 46 |
58
|
for (int i = 0; i < names.length; i++) { |
| 47 |
57
|
suite.addTest(new GenericM2Test(names[i])); |
| 48 |
|
} |
| 49 |
1
|
return suite; |
| 50 |
|
} |
| 51 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 52 |
57
|
@Override... |
| 53 |
|
protected void runTest() throws Throwable { |
| 54 |
57
|
assertFalse(solveInstance(PREFIX + "pigeons/hole9.cnf")); |
| 55 |
|
} |
| 56 |
|
} |