Added more tests
This commit is contained in:
parent
a75aad52f6
commit
49214c9a6e
8 changed files with 74 additions and 41 deletions
18
tests/programs/operator-assign-variable.q
Normal file
18
tests/programs/operator-assign-variable.q
Normal file
|
@ -0,0 +1,18 @@
|
|||
main() {
|
||||
f(10)
|
||||
}
|
||||
|
||||
f(x int) {
|
||||
y := x
|
||||
num := 2
|
||||
x -= num
|
||||
assert x < y
|
||||
x += num
|
||||
assert x == y
|
||||
x *= num
|
||||
assert x > y
|
||||
x /= num
|
||||
assert x == y
|
||||
x %= num
|
||||
assert x < num
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue