refactor: 重构死循环测试用例

- 将 initializer 改为 init
- 将 condition 改为 cond
- 将 update 改为 step
This commit is contained in:
Luke 2025-07-14 23:45:01 +08:00
parent c1d0e03b6c
commit e18d7426bc
4 changed files with 12 additions and 12 deletions

View File

@ -15,11 +15,11 @@ module: Math
body: body:
declare num1:int = 1 declare num1:int = 1
loop: loop:
initializer: init:
declare counter:int = 1 declare counter:int = 1
condition: cond:
counter <= n counter <= n
update: step:
counter = counter + 1 counter = counter + 1
body: body:
num1 = num1 * counter num1 = num1 * counter

View File

@ -3,11 +3,11 @@ function: main
return_type: int return_type: int
body: body:
loop: loop:
initializer: init:
declare i:int = 0 declare i:int = 0
condition: cond:
1 == 1 1 == 1
update: step:
i = i + 1 i = i + 1
body: body:

View File

@ -5,11 +5,11 @@ module: Main
body: body:
declare b1: boolean = true declare b1: boolean = true
loop: loop:
initializer: init:
declare i:int = 0 declare i:int = 0
condition: cond:
b1 b1
update: step:
i = i + 1 i = i + 1
body: body:

View File

@ -15,11 +15,11 @@ module: Math
body: body:
declare num1:int = 1 declare num1:int = 1
loop: loop:
initializer: init:
declare counter:int = 1 declare counter:int = 1
condition: cond:
counter <= n counter <= n
update: step:
counter = counter + 1 counter = counter + 1
body: body:
num1 = num1 * counter num1 = num1 * counter