hi-neason and Claude
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-09-27 17:56:39 +08:00
2026-06-23 07:20:17 +08:00
2026-05-21 22:42:02 +08:00
2026-09-21 11:50:44 +08:00
2026-05-06 15:51:18 +08:00
2026-04-11 10:18:31 +00:00
2026-04-11 10:18:31 +00:00
2026-05-05 22:46:22 +08:00
2026-06-15 09:22:50 +08:00
2026-03-11 07:52:36 +08:00
2026-03-14 08:46:38 +08:00
2026-06-04 10:05:17 +08:00
2026-08-13 17:08:29 +08:00
2026-08-13 17:08:29 +08:00
2026-09-27 14:22:21 +08:00
2026-03-07 07:55:24 +08:00
2026-09-27 14:22:21 +08:00
2026-09-10 20:21:41 +08:00
2026-09-10 20:21:41 +08:00
2026-09-20 22:03:34 +08:00
2026-08-26 10:31:39 +08:00
2026-08-26 10:31:39 +08:00
2026-09-27 18:00:27 +08:00
2026-05-21 22:21:34 +08:00
2026-08-26 10:41:04 +08:00
2026-09-10 12:58:17 +08:00
2026-09-21 07:34:56 +08:00
2026-09-27 14:23:08 +08:00
2026-09-27 14:23:39 +08:00
2026-03-14 11:58:53 +08:00
2026-09-21 07:34:56 +08:00
2026-09-21 07:34:56 +08:00
2026-06-09 23:30:57 +08:00
2026-06-11 00:10:12 +08:00
2026-03-04 12:38:37 +08:00
2026-05-18 10:13:45 +08:00
2026-08-28 07:35:56 +08:00
2026-08-23 21:44:40 +08:00
2026-09-20 22:03:49 +08:00
2026-08-16 16:13:08 +08:00
2026-08-26 10:41:04 +08:00
2026-05-18 11:38:48 +08:00
2026-05-18 11:38:48 +08:00
2026-04-24 06:49:32 +08:00
2026-04-24 06:49:32 +08:00
2026-05-18 09:58:00 +08:00
2026-05-18 09:58:00 +08:00
2026-08-23 22:46:39 +08:00
2026-08-14 08:31:08 +08:00
2026-09-20 21:03:26 +08:00
2026-03-21 20:32:22 +08:00
2026-09-27 14:23:39 +08:00
2026-04-12 20:40:02 +08:00
2026-04-12 20:40:02 +08:00
2026-03-27 23:59:11 +08:00
2026-03-27 23:59:11 +08:00
2026-08-14 08:35:35 +08:00
2026-05-05 22:40:44 +08:00
2026-05-05 22:40:44 +08:00
2026-06-21 21:24:43 +08:00
2026-06-21 21:24:43 +08:00
2026-04-18 15:24:32 +08:00
2026-03-21 20:32:22 +08:00
2026-03-21 20:32:22 +08:00
2026-03-04 23:57:13 +08:00
2026-03-15 07:41:48 +08:00
2026-03-15 07:41:48 +08:00
2026-03-05 20:56:38 +08:00
2026-04-19 00:10:29 +08:00
2026-04-09 16:50:25 +08:00
2026-05-21 22:42:02 +08:00
2026-04-09 16:50:25 +08:00
2026-04-09 16:50:25 +08:00
2026-04-09 16:50:25 +08:00
2026-03-05 20:56:38 +08:00
2026-04-19 00:10:29 +08:00
2026-07-05 06:52:40 +08:00
2026-07-05 06:52:40 +08:00
2026-08-16 21:47:04 +08:00
2026-04-11 19:45:08 +08:00
2026-04-11 19:45:08 +08:00
2026-04-27 15:06:17 +08:00
2026-04-27 15:06:17 +08:00
2026-04-11 19:45:08 +08:00
2026-06-16 10:01:32 +08:00
2026-06-16 10:01:32 +08:00
2026-06-16 10:01:32 +08:00
2026-06-09 23:14:35 +08:00
2026-09-21 07:34:56 +08:00
2026-08-28 07:35:56 +08:00
2026-09-21 07:34:56 +08:00
2026-09-21 07:34:56 +08:00
2026-08-16 16:13:08 +08:00
2026-04-19 08:57:45 +08:00
2026-06-20 07:58:12 +08:00
2026-09-20 22:03:34 +08:00
2026-05-18 10:24:45 +08:00
2026-05-18 10:24:45 +08:00
2026-07-05 06:45:00 +08:00
2026-07-05 06:45:00 +08:00
2026-06-11 00:10:12 +08:00
2026-06-11 00:10:12 +08:00
2026-03-13 09:54:16 -07:00
2026-06-15 13:48:53 +08:00
2026-06-15 13:48:53 +08:00
2026-03-05 20:56:38 +08:00
2026-03-20 00:31:00 +08:00
2026-06-06 21:34:56 +08:00
2026-03-16 17:04:19 +08:00
2026-03-16 17:04:19 +08:00
2026-03-31 08:33:20 +08:00
2026-04-15 20:49:13 +08:00
2026-03-14 11:33:59 +08:00
2026-09-21 07:34:56 +08:00
2026-07-22 23:50:03 +08:00
2026-07-22 23:50:03 +08:00
2026-09-20 22:03:34 +08:00
2026-09-20 22:03:34 +08:00
2026-05-21 22:42:02 +08:00
2026-04-30 17:25:33 +08:00