diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-14 00:10:38 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-14 00:10:38 +0200 |
commit | fc07d3bca67099d20e705b6aa7541e0e16646fdd (patch) | |
tree | 4779abbce1d58878b819f7e8c95f76907d0739e1 /test/jrummikub/ai | |
parent | d223eaaa9839dc974b5d51cbd004f92818e2ada4 (diff) | |
download | JRummikub-fc07d3bca67099d20e705b6aa7541e0e16646fdd.tar JRummikub-fc07d3bca67099d20e705b6aa7541e0e16646fdd.zip |
Finished solver core
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@428 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub/ai')
-rw-r--r-- | test/jrummikub/ai/fdsolver/SolverTest.java | 10 |
1 files changed, 4 insertions, 6 deletions
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<Integer>(false, y, x)); - int lastx = 0, lasty = 0; while (solver.solve()) { - lastx = x.getValue(); - lasty = y.getValue(); + solver.record(); solver.addConstraint(new LessThanConst<Integer>(false, x, x.getValue())); } - - assertEquals(2, lastx); - assertEquals(1, lasty); + solver.restore(); + assertEquals(2, (int)x.getValue()); + assertEquals(1, (int)y.getValue()); } } |