From e06ba8ea1346e5045a34508648ac93150aacb01a Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Fri, 17 Jun 2011 17:41:52 +0200 Subject: Reimplemented AI (old one was too slow) git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@443 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/ai/fdsolver/SolverTest.java | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 test/jrummikub/ai/fdsolver/SolverTest.java (limited to 'test/jrummikub/ai/fdsolver') diff --git a/test/jrummikub/ai/fdsolver/SolverTest.java b/test/jrummikub/ai/fdsolver/SolverTest.java deleted file mode 100644 index ae32b07..0000000 --- a/test/jrummikub/ai/fdsolver/SolverTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package jrummikub.ai.fdsolver; - -import static org.junit.Assert.assertEquals; -import jrummikub.ai.fdsolver.constraint.LessThan; -import jrummikub.ai.fdsolver.constraint.LessThanConst; - -import org.junit.Test; - -public class SolverTest { - @Test - public void test() { - Solver solver = new Solver(); - - Var x = solver.makeVar(1, 2, 3); - Var y = solver.makeRangeVar(1, 13); - - solver.addConstraint(new LessThan(false, y, x)); - - while (solver.solve()) { - solver.record(); - solver.addConstraint(new LessThanConst(false, x, x.getValue())); - } - solver.restore(); - assertEquals(2, (int)x.getValue()); - assertEquals(1, (int)y.getValue()); - } -} -- cgit v1.2.3