test/test-board.rb in shogi-ruby-0.0.8 vs test/test-board.rb in shogi-ruby-0.0.9
- old
+ new
@@ -136,19 +136,28 @@
assert_false(@board.move("+2726HI"))
end
assert_raise Shogi::MoveError do
assert_false(@board.move("+2827HI"))
end
+ assert_raise Shogi::MovementError do
+ assert_false(@board.move("+2826HI"))
+ end
assert_raise Shogi::MoveError do
assert_false(@board.move("+2625FU"))
end
assert_raise Shogi::MovementError do
assert_false(@board.move("+2725FU"))
end
assert_raise Shogi::MoveError do
assert_false(@board.move("-4131KI"))
end
+ assert_raise Shogi::MovementError do
+ assert_false(@board.move("+8855KA"))
+ end
+ assert_raise Shogi::MovementError do
+ assert_false(@board.move("-1115KY"))
+ end
assert_nothing_raised do
@board.move("+7776FU")
@board.move("-4132KI")
@board.move("+2868HI")
@@ -165,9 +174,13 @@
P8 * +KA * +HI * * * * *
P9+KY+KE+GI+KI+OU+KI+GI+KE+KY
P+
P-
EOT
+
+ assert_raise Shogi::MovementError do
+ assert_false(@board.move("+8833UM").move("-2233KA").move("+0016FU"))
+ end
end
def test_move_csa_chain
assert_nothing_raised do
@board.move("+7776FU", :csa).move("-4132KI", :csa)