Added operator precedence test
This commit is contained in:
parent
ec2001fe1e
commit
78ddfa6dbc
3 changed files with 8 additions and 2 deletions
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
|
||||
}{
|
||||
{"empty.q", "", 0},
|
||||
{"square-sum.q", "", 25},
|
||||
{"multi-calls.q", "", 9},
|
||||
{"exit.q", "", 9},
|
||||
{"precedence.q", "", 10},
|
||||
{"register-overlap.q", "", 9},
|
||||
{"square-sum.q", "", 25},
|
||||
}
|
||||
|
||||
func TestPrograms(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue