chore(dev): 调整test用例结构

This commit is contained in:
jing
2026-03-13 21:37:37 +08:00
parent b26c40f6ad
commit 10ea8aad14
44 changed files with 124 additions and 20 deletions

View File

@@ -28,7 +28,7 @@ Lab1 聚焦前端第一步:词法/语法分析。
1. 主要覆盖 `int main() { ... }` 这一固定函数形态。
2. 只包含少量声明/返回/表达式能力(用于演示完整流程)。
3. 示例用例位于 `test/test_case/function/simple_add.sy`
3. 示例用例位于 `test/test_case/functional/simple_add.sy`
## 5. 构建与生成流程
@@ -68,7 +68,7 @@ cmake --build build -j "$(nproc)"
```bash
# 仅输出语法树
./build/bin/compiler --emit-parse-tree test/test_case/function/simple_add.sy
./build/bin/compiler --emit-parse-tree test/test_case/functional/simple_add.sy
```
但最终不能只检查 `simple_add`。完成 Lab1 后,应至少对 `test/test_case` 下全部 `.sy` 用例逐个验证解析是否成功;如有需要,也可以自行编写批量测试脚本统一执行。