refactor: 重构死循环测试用例
- 将 initializer 改为 init - 将 condition 改为 cond - 将 update 改为 step
This commit is contained in:
parent
c1d0e03b6c
commit
e18d7426bc
@ -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
|
||||||
|
|||||||
@ -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:
|
||||||
|
|
||||||
|
|||||||
@ -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:
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user