chore(dev): 调整test用例结构
This commit is contained in:
@@ -95,7 +95,7 @@ cmake --build build -j "$(nproc)"
|
||||
### 6.1 观察 IR
|
||||
|
||||
```bash
|
||||
./build/bin/compiler --emit-ir test/test_case/function/simple_add.sy
|
||||
./build/bin/compiler --emit-ir test/test_case/functional/simple_add.sy
|
||||
```
|
||||
|
||||
这条命令只适合先观察单个样例的 IR 形态。完成 Lab4 后,不能只检查 `simple_add`,还应覆盖 `test/test_case` 下全部测试用例。
|
||||
@@ -103,8 +103,8 @@ cmake --build build -j "$(nproc)"
|
||||
### 6.2 语义回归
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
目标:脚本自动读取同名 `.in`,并将程序输出与退出码和同名 `.out` 比对,确保优化后程序行为与优化前保持一致。
|
||||
|
||||
Reference in New Issue
Block a user