chore(dev): 调整test用例结构
This commit is contained in:
@@ -47,13 +47,13 @@ cmake --build build -j "$(nproc)"
|
||||
可先用单个样例检查汇编输出是否基本正确:
|
||||
|
||||
```bash
|
||||
./build/bin/compiler --emit-asm test/test_case/function/simple_add.sy
|
||||
./build/bin/compiler --emit-asm test/test_case/functional/simple_add.sy
|
||||
```
|
||||
|
||||
推荐使用统一脚本验证 “源码 -> 汇编 -> 可执行程序” 整体链路。`--run` 模式下会自动读取同名 `.in`,并将程序输出与退出码和同名 `.out` 比对,用于验证后端代码生成的正确性:
|
||||
|
||||
```bash
|
||||
./scripts/verify_asm.sh test/test_case/function/simple_add.sy test/test_result/function/asm --run
|
||||
./scripts/verify_asm.sh test/test_case/functional/simple_add.sy test/test_result/function/asm --run
|
||||
```
|
||||
|
||||
若最终输出 `输出匹配: test/test_case/simple_add.out`,说明当前示例用例 `return a + b` 的完整后端链路已经跑通。
|
||||
|
||||
Reference in New Issue
Block a user