• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shogi-server source


Commit MetaInfo

Revision922cac230563070d38419c8248b56188a3fce4bf (tree)
Zeit2020-12-06 16:19:09
AutorDaigo Moriwaki <beatles@sgtp...>
CommiterDaigo Moriwaki

Log Message

Fix test cases

Ändern Zusammenfassung

Diff

--- a/test/TC_command.rb
+++ b/test/TC_command.rb
@@ -90,7 +90,7 @@ class TestFactoryMethod < Test::Unit::TestCase
9090
9191 def test_keep_alive_command
9292 cmd = ShogiServer::Command.factory("", @p)
93- assert_instance_of(ShogiServer::KeepAliveCommand, cmd)
93+ assert_instance_of(ShogiServer::SpecialCommand, cmd)
9494 end
9595
9696 def test_move_command
@@ -214,7 +214,7 @@ class TestFactoryMethod < Test::Unit::TestCase
214214 end
215215
216216 def test_space_command
217- cmd = ShogiServer::Command.factory(" ", @p)
217+ cmd = ShogiServer::Command.factory(" ", @p)
218218 assert_instance_of(ShogiServer::SpaceCommand, cmd)
219219 end
220220
@@ -315,20 +315,6 @@ end
315315
316316 #
317317 #
318-class TestKeepAliveCommand < Test::Unit::TestCase
319- def setup
320- @p = MockPlayer.new
321- end
322-
323- def test_call
324- cmd = ShogiServer::KeepAliveCommand.new("", @p)
325- rc = cmd.call
326- assert_equal(:continue, rc)
327- end
328-end
329-
330-#
331-#
332318 class TestMoveCommand < Test::Unit::TestCase
333319 def setup
334320 @p = MockPlayer.new
@@ -417,6 +403,12 @@ class TestSpecialComand < Test::Unit::TestCase
417403 rc = cmd.call
418404 assert_equal(:continue, rc)
419405 end
406+
407+ def test_keep_alive
408+ cmd = ShogiServer::SpecialCommand.new("", @p)
409+ rc = cmd.call
410+ assert_equal(:continue, rc)
411+ end
420412 end
421413
422414 #
@@ -822,7 +814,7 @@ class TestSpaceCommand < Test::Unit::TestCase
822814 end
823815
824816 def test_call
825- cmd = ShogiServer::SpaceCommand.new("", @p)
817+ cmd = ShogiServer::SpaceCommand.new(" ", @p)
826818 rc = cmd.call
827819
828820 assert_equal(:continue, rc)
--- a/test/mock_log_message.rb
+++ b/test/mock_log_message.rb
@@ -30,3 +30,7 @@ def log_info(msg)
3030 $logger.info(msg)
3131 end
3232
33+def log_debug(msg)
34+ $logger.info(msg)
35+end
36+