Commit ac4c8b50 authored by leberre's avatar leberre

Changed the test to use the new methods.

git-svn-id: svn+ssh://svn.forge.ow2.org/svnroot/sat4j/maven/trunk@1390 ba638df5-4473-46d1-82f8-c3ae2a17a6e1
parent e9ce0bdd
......@@ -36,13 +36,14 @@ import org.sat4j.minisat.restarts.LubyRestarts;
public class TestLubyFunction {
@Test
public void testSomeKnownValues() {
int[] knowvalues = { 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 4, 8 };
for (int i = 0; i < knowvalues.length; i++) {
assertEquals("Wrong value for "+i,knowvalues[i], LubyRestarts.luby(i + 1));
}
}
@Test
public void testSomeKnownValues() {
LubyRestarts lr = new LubyRestarts();
int[] knowvalues = { 1, 1, 2, 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 4, 8 };
assertEquals(1, lr.luby());
for (int i = 1; i < knowvalues.length; i++) {
assertEquals("Wrong value for " + i, knowvalues[i], lr.nextLuby());
}
}
}
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