added testing suite for binary and unary operations typechecking

This commit is contained in:
Partho Bhattacharya
2025-03-27 03:06:58 -04:00
parent 22c1a79e03
commit 04418cc75d
6 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,6 @@
entry(arg) := {
[integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
b2 := 3 < x;
b1 := arr = 2;
b1 := 6<7 & arr2=7;
}

View File

@ -0,0 +1,5 @@
entry(arg) := {
[integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
b2 := !(3 < 2);
b1 := !5;
}

View File

@ -0,0 +1,9 @@
entry(arg) := {
[integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1; character : a]
x := 3 + 2 * 8;
x := 3 - 2 / 8;
x := a * 2 % 8;
b2 := 3 * 2 % 8;
x := 3 % 2 * 8;
x := 3 + arr - 8;
}

View File

@ -0,0 +1,6 @@
entry(arg) := {
[integer:x; address: arr; address: arr2; Boolean : b2; Boolean : b1]
x := -8;
x := -b1;
b2 := -x;
}