diff -r 60187fe9405d -r 875773ff406b src/test/java/ru/alphatech/icfpc/cards/tests/TestSucc.java --- a/src/test/java/ru/alphatech/icfpc/cards/tests/TestSucc.java Sun Jun 19 18:55:26 2011 +0400 +++ b/src/test/java/ru/alphatech/icfpc/cards/tests/TestSucc.java Sun Jun 19 18:55:47 2011 +0400 @@ -14,15 +14,39 @@ public class TestSucc extends TestCase { @Test + public void testEqualValue() + { + Player opponent = new Player(); + Player proponent = new Player(); + + assertEquals(65535, ((Value)new Succ().returnValue(new Value(65535), proponent, opponent)).getValue()); + } + + @Test + public void testBiggestValue() + { + Player opponent = new Player(); + Player proponent = new Player(); + + assertEquals(65535, ((Value)new Succ().returnValue(new Value(65536), proponent, opponent)).getValue()); + } + + @Test public void testValue() { Player opponent = new Player(); Player proponent = new Player(); - IValue x = new Value(10); + + assertEquals(11, ((Value)new Succ().returnValue(new Value(10), proponent, opponent)).getValue()); + } + + @Test + public void testErrorValue() + { + Player opponent = new Player(); + Player proponent = new Player(); IValue i = new I(); - assertEquals(65535, ((Value)new Succ().returnValue(new Value(65535), proponent, opponent)).getValue()); - assertEquals(65535, ((Value)new Succ().returnValue(new Value(65536), proponent, opponent)).getValue()); - assertEquals(11, ((Value)new Succ().returnValue(new Value(10), proponent, opponent)).getValue()); + try { new Succ().returnValue(i, proponent, opponent);