Add testing

This commit is contained in:
MaxanRus 2021-12-27 16:53:28 +03:00
parent 88ca215573
commit c33b2eee86
9 changed files with 109 additions and 6 deletions

View file

@ -0,0 +1,13 @@
int x = 0;
for (int i = 0; i < 10; i += 1) {
x += i;
}
print(x);
for (int i = 0; i < 10; i += 1) {
x -= i;
}
print(x);
for (int i = 0; i < 4; i += 1) {
x = (x + 1) * i;
}
print(x);

3
tests/programs/int/1.res Normal file
View file

@ -0,0 +1,3 @@
45
0
15

View file

@ -0,0 +1,11 @@
string s = "";
for (int i = 0; i < 10; i += 1) {
if ((i / 2) * 2 == i) {
s += "a";
}
if ((i / 2) * 2 != i) {
s += "b";
}
}
print(s);

View file

@ -0,0 +1 @@
ababababab