mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-08-06 23:34:49 +00:00
add comprehensive test coverage for resume.go Add 34 focused tests for session/resume.go, which previously had no dedicated test file. Tests cover every exported and unexported function: - SessionFilePath: empty ID rejection, valid path construction - CompletedCount: nil state, empty items, populated items - Item: nil state, missing key, found key, defensive copy verification - ValidateOptions: nil/workspace/empty/missing mode rejection, mode mismatch, range match/mismatch, commit match/mismatch, unsupported mode - applyResumeLine: session_start, review_item_done (with NewPath fallback and empty fingerprint skip), review_item_reused, review_item_failed (removal + empty fingerprint), unknown type, invalid JSON - applySessionStart: RepoDir preservation/override, SessionID preservation, all fields set - copyLlmComments: nil input, empty slice, deep copy with mutation isolation - LoadResumeState: nonexistent file, empty file, multiple records round-trip, invalid JSON, fail-then-redo replay sequencing |
||
|---|---|---|
| .. | ||
| agent | ||
| config | ||
| delegate | ||
| diff | ||
| gitcmd | ||
| llm | ||
| llmloop | ||
| mcp | ||
| model | ||
| pathutil | ||
| release | ||
| scan | ||
| session | ||
| stdout | ||
| suggestdiff | ||
| telemetry | ||
| tool | ||
| viewer | ||