chore(dev): 调整test用例结构
This commit is contained in:
@@ -59,8 +59,8 @@ cmake --build build -j "$(nproc)"
|
||||
### 7.1 功能回归
|
||||
|
||||
```bash
|
||||
./scripts/verify_ir.sh test/test_case/function/simple_add.sy test/test_result/function/ir --run
|
||||
./scripts/verify_asm.sh test/test_case/function/simple_add.sy test/test_result/function/asm --run
|
||||
./scripts/verify_ir.sh test/test_case/functional/simple_add.sy test/test_result/function/ir --run
|
||||
./scripts/verify_asm.sh test/test_case/functional/simple_add.sy test/test_result/function/asm --run
|
||||
```
|
||||
|
||||
`--run` 模式下脚本会自动读取同名 `.in`,并将程序输出与退出码和同名 `.out` 比对。
|
||||
@@ -71,8 +71,8 @@ cmake --build build -j "$(nproc)"
|
||||
|
||||
```bash
|
||||
# 对比优化前后 IR/汇编输出(按你实现的开关或日志方式执行)
|
||||
./build/bin/compiler --emit-ir test/test_case/function/simple_add.sy
|
||||
./build/bin/compiler --emit-asm test/test_case/function/simple_add.sy
|
||||
./build/bin/compiler --emit-ir test/test_case/functional/simple_add.sy
|
||||
./build/bin/compiler --emit-asm test/test_case/functional/simple_add.sy
|
||||
```
|
||||
|
||||
这里的 `simple_add` 只用于展示如何观察单个样例的输出差异;实际评估优化效果时,仍应结合更多测试用例,必要时覆盖全部测试集。
|
||||
|
||||
Reference in New Issue
Block a user