Test while loop.
Todas las comprobaciones han sido exitosas
The build was successful.

Este commit está contenido en:
Rafal Kupiec 2019-04-16 19:31:24 +02:00
padre 88d382b76b
commit a5da714d61
Firmado por: belliash
ID de clave GPG: 4E829243E0CFE6B4
Se han modificado 2 ficheros con 29 adiciones y 0 borrados

23
tests/loop_while_test.aer Archivo normal
Ver fichero

@ -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 Archivo normal
Ver fichero

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