1.1 --- a/src/test/java/ru/alphatech/icfpc/cards/tests/TestSucc.java Sun Jun 19 15:11:22 2011 +0400
1.2 +++ b/src/test/java/ru/alphatech/icfpc/cards/tests/TestSucc.java Sun Jun 19 17:53:59 2011 +0400
1.3 @@ -14,15 +14,39 @@
1.4 public class TestSucc extends TestCase
1.5 {
1.6 @Test
1.7 + public void testEqualValue()
1.8 + {
1.9 + Player opponent = new Player();
1.10 + Player proponent = new Player();
1.11 +
1.12 + assertEquals(65535, ((Value)new Succ().returnValue(new Value(65535), proponent, opponent)).getValue());
1.13 + }
1.14 +
1.15 + @Test
1.16 + public void testBiggestValue()
1.17 + {
1.18 + Player opponent = new Player();
1.19 + Player proponent = new Player();
1.20 +
1.21 + assertEquals(65535, ((Value)new Succ().returnValue(new Value(65536), proponent, opponent)).getValue());
1.22 + }
1.23 +
1.24 + @Test
1.25 public void testValue()
1.26 {
1.27 Player opponent = new Player();
1.28 Player proponent = new Player();
1.29 - IValue x = new Value(10);
1.30 +
1.31 + assertEquals(11, ((Value)new Succ().returnValue(new Value(10), proponent, opponent)).getValue());
1.32 + }
1.33 +
1.34 + @Test
1.35 + public void testErrorValue()
1.36 + {
1.37 + Player opponent = new Player();
1.38 + Player proponent = new Player();
1.39 IValue i = new I();
1.40 - assertEquals(65535, ((Value)new Succ().returnValue(new Value(65535), proponent, opponent)).getValue());
1.41 - assertEquals(65535, ((Value)new Succ().returnValue(new Value(65536), proponent, opponent)).getValue());
1.42 - assertEquals(11, ((Value)new Succ().returnValue(new Value(10), proponent, opponent)).getValue());
1.43 +
1.44 try
1.45 {
1.46 new Succ().returnValue(i, proponent, opponent);