OSDN Git Service
(root)
/
shogi-server
/
shogi-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- shogi_server/player.rb: Added new methods: is_human? and is_computer?.
[shogi-server/shogi-server.git]
/
test
/
TC_player.rb
diff --git
a/test/TC_player.rb
b/test/TC_player.rb
index
d41a829
..
6858bad
100644
(file)
--- a/
test/TC_player.rb
+++ b/
test/TC_player.rb
@@
-29,5
+29,17
@@
class TestPlayer < Test::Unit::TestCase
def test_rating_group
assert_nothing_raised {@p.rating_group = 1}
end
def test_rating_group
assert_nothing_raised {@p.rating_group = 1}
end
+
+ def test_human1
+ @p.name = "hoge_human"
+ assert(@p.is_human?)
+ assert(!@p.is_computer?)
+ end
+
+ def test_human2
+ @p.name = "hoge_human@p1"
+ assert(@p.is_human?)
+ assert(!@p.is_computer?)
+ end
end
end