Improved code generation
This commit is contained in:
11
tests/programs/return.q
Normal file
11
tests/programs/return.q
Normal file
@ -0,0 +1,11 @@
|
||||
main() {
|
||||
syscall(60, f(2))
|
||||
}
|
||||
|
||||
f(x) {
|
||||
return x + 1 + g(x)
|
||||
}
|
||||
|
||||
g(x) {
|
||||
return x + 1
|
||||
}
|
@ -20,6 +20,7 @@ var programs = []struct {
|
||||
{"square-sum.q", "", 25},
|
||||
{"chained-calls.q", "", 9},
|
||||
{"nested-calls.q", "", 4},
|
||||
{"return.q", "", 6},
|
||||
}
|
||||
|
||||
func TestPrograms(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user