From fc07d3bca67099d20e705b6aa7541e0e16646fdd Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 14 Jun 2011 00:10:38 +0200 Subject: Finished solver core git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@428 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/ai/fdsolver/SolverTest.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/jrummikub/ai/fdsolver/SolverTest.java b/test/jrummikub/ai/fdsolver/SolverTest.java index 535ef57..ae32b07 100644 --- a/test/jrummikub/ai/fdsolver/SolverTest.java +++ b/test/jrummikub/ai/fdsolver/SolverTest.java @@ -16,14 +16,12 @@ public class SolverTest { solver.addConstraint(new LessThan(false, y, x)); - int lastx = 0, lasty = 0; while (solver.solve()) { - lastx = x.getValue(); - lasty = y.getValue(); + solver.record(); solver.addConstraint(new LessThanConst(false, x, x.getValue())); } - - assertEquals(2, lastx); - assertEquals(1, lasty); + solver.restore(); + assertEquals(2, (int)x.getValue()); + assertEquals(1, (int)y.getValue()); } } -- cgit v1.2.3