Implemented boolean operators
This commit is contained in:
parent
13161f5021
commit
1c4d2d4f88
9 changed files with 198 additions and 24 deletions
37
tests/programs/branch-and.q
Normal file
37
tests/programs/branch-and.q
Normal file
|
@ -0,0 +1,37 @@
|
|||
main() {
|
||||
x := 0
|
||||
|
||||
if x != x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x == x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x != x && x == x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x == x && x != x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x != x && x == x && x != x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x != x && x != x && x == x {
|
||||
exit(1)
|
||||
}
|
||||
|
||||
if x == x && x == x && x == x {
|
||||
exit(0)
|
||||
}
|
||||
|
||||
exit(1)
|
||||
}
|
||||
|
||||
exit(x) {
|
||||
syscall(60, x)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue