Added operator precedence test
This commit is contained in:
parent
62057704f3
commit
c13a70c958
5
tests/programs/precedence.q
Normal file
5
tests/programs/precedence.q
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
main() {
|
||||||
|
x := 2
|
||||||
|
y := 3
|
||||||
|
syscall(60, (x + y + (x + y) * (x + y)) / x / y + x + y)
|
||||||
|
}
|
@ -16,9 +16,10 @@ var programs = []struct {
|
|||||||
ExpectedExitCode int
|
ExpectedExitCode int
|
||||||
}{
|
}{
|
||||||
{"empty.q", "", 0},
|
{"empty.q", "", 0},
|
||||||
{"square-sum.q", "", 25},
|
|
||||||
{"multi-calls.q", "", 9},
|
{"multi-calls.q", "", 9},
|
||||||
{"exit.q", "", 9},
|
{"precedence.q", "", 10},
|
||||||
|
{"register-overlap.q", "", 9},
|
||||||
|
{"square-sum.q", "", 25},
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPrograms(t *testing.T) {
|
func TestPrograms(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user