Added more tests
This commit is contained in:
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
|
||||
}
|
Reference in New Issue
Block a user