Added more tests
This commit is contained in:
12
tests/programs/math.q
Normal file
12
tests/programs/math.q
Normal file
@ -0,0 +1,12 @@
|
||||
main() {
|
||||
x := 1000
|
||||
syscall(60, div10(x) / 10 + div(x, 100) * 4 - 40 - x + x)
|
||||
}
|
||||
|
||||
div(x, y) {
|
||||
return x / y
|
||||
}
|
||||
|
||||
div10(x) {
|
||||
return x / 10
|
||||
}
|
@ -16,6 +16,7 @@ var programs = []struct {
|
||||
ExpectedExitCode int
|
||||
}{
|
||||
{"empty.q", "", 0},
|
||||
{"math.q", "", 10},
|
||||
{"precedence.q", "", 10},
|
||||
{"square-sum.q", "", 25},
|
||||
{"chained-calls.q", "", 9},
|
||||
|
Reference in New Issue
Block a user