[unit-tests] カバレッジ補強 フェーズ2: Commands/ MapCommand/Process/UnitCommand テスト追加#915
Open
github-actions[bot] wants to merge 2 commits intomasterfrom
Open
[unit-tests] カバレッジ補強 フェーズ2: Commands/ MapCommand/Process/UnitCommand テスト追加#915github-actions[bot] wants to merge 2 commits intomasterfrom
github-actions[bot] wants to merge 2 commits intomasterfrom
Conversation
Command.mapcommend.cs / Command.process.cs / Command.unitcommand.cs の 公開 API およびアクセス可能な状態遷移パスを対象にテストを追加する。 追加テストファイル: - CommandMapCommandTests.cs (7件) - MapCommand_EndTurnCmdID × ViewMode=true 早期リターン - MapCommand_AutoDefenseCmdID 自動反撃モード反転 - CommandProcessTests.cs (13件) - ProceedCommand × ViewMode=true 早期リターン / by_cancel 分岐 - ProceedInput × マップコマンド状態でのボタン入力 - CancelCommand × ユニット選択 / コマンド選択 状態遷移 - CommandUnitCommandTests.cs (5件) - UnitCommand × MoveCmdID / 未知ID × 移動後コマンド選択 早期リターン 合計: 25件追加 (7385件 → +25件) 備考: - attack.cs / process.cs の複雑なパスは GUI 依存が深いため除外 - unitmove / unitxxx / unitsupply / launch 等の private-only ファイルは 公開 API が存在しないためテスト困難 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧪 カバレッジ補強レポート (2026-04-05)
現在のフェーズ / Current Phase
Command.mapcommend.cs/Command.process.cs/Command.unitcommand.cs追加したテスト / Tests Added
CommandMapCommandTests.csCommandProcessTests.csCommandUnitCommandTests.cs合計: 25件追加
テスト観点
CommandMapCommandTests.cs
MapCommand(EndTurnCmdID)×ViewMode=true→ViewModeがfalseになりCommandState="ユニット選択"に設定されるMapCommand(AutoDefenseCmdID)→SystemConfig.AutoDefenseがトグルされる (false→true, true→false)CommandProcessTests.cs
ProceedCommand(by_cancel=true)×ViewMode=true→ViewMode=falseで早期リターンProceedCommand(by_cancel=false)×ViewMode=true→ViewMode変更なしで早期リターンProceedInput(Left, "マップコマンド")→CommandState="ユニット選択"に変更ProceedInput(Right, "マップコマンド")→CommandState="ユニット選択"に変更CancelCommand()×CommandState="ユニット選択"→ 状態変更なしCancelCommand()×CommandState="コマンド選択"→CommandState="ユニット選択",SelectedCommand=""に設定CommandUnitCommandTests.cs
UnitCommand(MoveCmdID)×CommandState="移動後コマンド選択"→ 早期リターン (GUI なし)UnitCommand(未知ID)×CommandState="移動後コマンド選択"→ 早期リターン (GUI なし)カバレッジサマリー / Coverage Summary
define,props,state,process,mapcommend,unitcommand(部分)attack,launch,preview,unitability,unitcommand(private),unitform,unitmove,unitsp,unitsupply,unitxxx除外理由 / Excluded Reasons
以下のファイルは今回除外しました:
Command.attack.cs/Command.process.cs(各1500行超): GUI 依存が深く、設定が複雑Command.unitmove.cs/Command.unitxxx.cs/Command.unitsupply.cs/Command.launch.cs等: public API が存在せず、private メソッドのみCommand.unitcommand.csのWaitCmdID以降:GUI.RedrawScreen()/Map.Terrain()等が必要テスト結果 / Test Results
Passed: 7385, Skipped: 0, Failed: 0
次のステップ: 次回実行で
Intermissions/(フェーズ3) または残りのCommands/ファイルをカバーNext step: Cover
Intermissions/(Phase 3) or remainingCommands/files on the next run