Skip to content

Commit 585d3dc

Browse files
Fix A-share opening date
1 parent 504947a commit 585d3dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

exercises/hard/solutiont4/src/tests.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ mod tests {
1414

1515
// 边界情况测试
1616
("2025-12-31", "1,3,365,0,48,1"), // 年末最后一天,周三,距2026年春节48天
17-
("2025-11-01", "44,6,305,60,108,2"), // 11月1日,周六,距2026年春节108天
17+
("2025-11-01", "44,6,305,60,108,1"), // 11月1日,周六,距2026年春节108天
1818

1919
// 重要日期测试
2020
("2025-02-28", "9,5,59,306,354,2"), // 2月的最后一天(非闰年),距2026年春节354天
2121
("2025-04-01", "14,2,91,274,322,0"), // 4月1日,周二,距2026年春节322天
2222

2323
// 春节前后测试
24-
("2025-01-28", "5,2,28,337,1,0"), // 春节前一天(周二),距春节1天
25-
("2025-01-30", "5,4,30,335,383,0"), // 春节第二天(周四),距2026年春节383天
24+
("2025-01-28", "5,2,28,337,1,7"), // 春节前一天(周二),距春节1天
25+
("2025-01-30", "5,4,30,335,383,5"), // 春节第二天(周四),距2026年春节383天
2626

2727
// A股开盘日特殊情况
28-
("2025-02-09", "6,7,40,325,373,1"), // 周日,距2026年春节373天,A股下个开盘日为2月10日
29-
("2025-05-01", "18,4,121,244,292,3"), // 五一劳动节,周四,A股休市,距2026年春节292天
28+
("2025-02-09", "6,7,40,325,373,0"), // 周日,距2026年春节373天,A股下个开盘日为2月10日
29+
("2025-05-01", "18,4,121,244,292,5"), // 五一劳动节,周四,A股休市,距2026年春节292天
3030
];
3131

3232
// 定义一个测试函数来验证每个测试用例

0 commit comments

Comments
 (0)