refactor: 重构死循环测试用例
- 将 initializer 改为 init - 将 condition 改为 cond - 将 update 改为 step
This commit is contained in:
parent
c1d0e03b6c
commit
e18d7426bc
@ -15,11 +15,11 @@ module: Math
|
||||
body:
|
||||
declare num1:int = 1
|
||||
loop:
|
||||
initializer:
|
||||
init:
|
||||
declare counter:int = 1
|
||||
condition:
|
||||
cond:
|
||||
counter <= n
|
||||
update:
|
||||
step:
|
||||
counter = counter + 1
|
||||
body:
|
||||
num1 = num1 * counter
|
||||
|
||||
@ -3,11 +3,11 @@ function: main
|
||||
return_type: int
|
||||
body:
|
||||
loop:
|
||||
initializer:
|
||||
init:
|
||||
declare i:int = 0
|
||||
condition:
|
||||
cond:
|
||||
1 == 1
|
||||
update:
|
||||
step:
|
||||
i = i + 1
|
||||
body:
|
||||
|
||||
|
||||
@ -5,11 +5,11 @@ module: Main
|
||||
body:
|
||||
declare b1: boolean = true
|
||||
loop:
|
||||
initializer:
|
||||
init:
|
||||
declare i:int = 0
|
||||
condition:
|
||||
cond:
|
||||
b1
|
||||
update:
|
||||
step:
|
||||
i = i + 1
|
||||
body:
|
||||
|
||||
|
||||
@ -15,11 +15,11 @@ module: Math
|
||||
body:
|
||||
declare num1:int = 1
|
||||
loop:
|
||||
initializer:
|
||||
init:
|
||||
declare counter:int = 1
|
||||
condition:
|
||||
cond:
|
||||
counter <= n
|
||||
update:
|
||||
step:
|
||||
counter = counter + 1
|
||||
body:
|
||||
num1 = num1 * counter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user