Test while loop.
所有检测均成功
The build was successful.

这个提交包含在:
Rafal Kupiec 2019-04-16 19:31:24 +02:00
父节点 88d382b76b
当前提交 a5da714d61
签署人:: belliash
GPG 密钥 ID: 4E829243E0CFE6B4
共有 2 个文件被更改,包括 29 次插入0 次删除

23
tests/loop_while_test.aer 普通文件
查看文件

@ -0,0 +1,23 @@
class Program {
private int test() {
static int $x = 9;
return $x--;
}
public void main() {
int $a;
int $b = 2;
while($a = $this->test()) {
int $b = $a;
if($b == 6) {
continue;
} else if($b == 3) {
break;
}
print("$b\n");
}
print("$b\n");
}
}

6
tests/loop_while_test.exp 普通文件
查看文件

@ -0,0 +1,6 @@
9
8
7
5
4
2