4 class TestShogiNotation < Test::Unit::TestCase
6 @game = Game.get(:shogi)
7 @notation = @game.notation
10 def test_point_to_coord
12 @notation.point_to_coord(Point.new(3, 1))
14 @notation.point_to_coord(Point.new(4, 4))
17 def test_point_from_coord
18 assert_equal Point.new(3, 1),
19 @notation.point_from_coord('6b')
20 assert_equal Point.new(4, 4),
21 @notation.point_from_coord('5e')
25 notation = @notation.from_s('+L-4e')
26 assert_equal :promoted_lance, notation[:type]
27 assert_nil notation[:src]
28 assert ! notation[:drop]
29 assert_equal Point.new(5, 4), notation[:dst]