Add tests for previous commit

This commit is contained in:
Joey Yakimowich-Payne 2018-06-03 16:51:15 +09:00
commit cccf36eb4f
21 changed files with 86 additions and 3 deletions

View file

@ -0,0 +1,3 @@
int main() {
a[i++];
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
a[postInc(i)]

View file

@ -0,0 +1,3 @@
int main() {
(double) 20;
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
cast[cdouble](20)

View file

@ -0,0 +1,5 @@
int main() {
if (a > b) {
printf("A is greater");
}
}

View file

@ -0,0 +1,3 @@
proc main(): cint =
if(a > b):
printf("A is greater")

View file

@ -0,0 +1,8 @@
int main() {
if (a > b) {
printf("A is greater");
}
else {
printf("B is greater or equal");
}
}

View file

@ -0,0 +1,5 @@
proc main(): cint =
if(a > b):
printf("A is greater")
else:
printf("B is greater or equal")

View file

@ -0,0 +1,11 @@
int main() {
if (a > b) {
printf("A is greater");
}
else if (a == b) {
printf("A and B are equal");
}
else {
printf("A is less than B");
}
}

View file

@ -0,0 +1,7 @@
proc main(): cint =
if(a > b):
printf("A is greater")
elif(a == b):
printf("A and B are equal")
else:
printf("A is less than B")

View file

@ -0,0 +1,3 @@
int main() {
j = i < 0 ? -5 : 5;
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
j = if i < 0: -5 else: 5

View file

@ -0,0 +1,3 @@
int main() {
sizeof a;
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
sizeof(a)

View file

@ -0,0 +1,3 @@
int main() {
sizeof(int);
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
sizeof(cint)

View file

@ -0,0 +1,3 @@
int main() {
a.twenty;
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
a.twenty

View file

@ -0,0 +1,3 @@
int main() {
a->twenty;
}

View file

@ -0,0 +1,2 @@
proc main(): cint =
a.twenty