Files
cc-connect/core
hi-neasonandClaude 73ea597230 test(core): cover DirHistory move-to-front, trim, persistence, bounds (#1663)
DirHistory's exported methods (Add, List, Get, Previous, Contains,
SetMaxSize) had no direct tests; engine tests only used NewDirHistory
as setup. The methods carry non-trivial logic — move-to-front dedup,
maxSize trimming, 1-based Get with bounds check, Previous at index 2,
defensive-copy List, JSON persistence across instances — so a
regression in any of them would have gone unnoticed.

Add table-driven tests covering each behavior plus the corrupt-file
load path.

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-27 18:00:27 +08:00
..
2026-06-23 07:20:17 +08:00