add tests for conditions
This commit is contained in:
parent
b5d13ab1d6
commit
6cd6f66d4b
2 changed files with 18 additions and 0 deletions
9
tests/24_if-else.test
Normal file
9
tests/24_if-else.test
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
void main () {
|
||||||
|
bool cab = true;
|
||||||
|
bool a = cab;
|
||||||
|
if (a) {
|
||||||
|
puts("a est vraie\n");
|
||||||
|
} else {
|
||||||
|
puts("a est fausse\n");
|
||||||
|
}
|
||||||
|
}
|
9
tests/25_if.test
Normal file
9
tests/25_if.test
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
void main () {
|
||||||
|
bool cab = true;
|
||||||
|
bool a = cab;
|
||||||
|
if (a) {
|
||||||
|
puts("a est vraie\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
puts("a est fausse\n");
|
||||||
|
}
|
Reference in a new issue