diff --git a/tests/programs/reuse.q b/tests/programs/reuse.q new file mode 100644 index 0000000..073fd49 --- /dev/null +++ b/tests/programs/reuse.q @@ -0,0 +1,7 @@ +main() { + syscall(60, f(1)) +} + +f(x) { + return x + 1 + x +} \ No newline at end of file diff --git a/tests/programs_test.go b/tests/programs_test.go index c7d7f1a..c6724ea 100644 --- a/tests/programs_test.go +++ b/tests/programs_test.go @@ -22,6 +22,7 @@ var programs = []struct { {"chained-calls.q", "", 9}, {"nested-calls.q", "", 4}, {"parameters.q", "", 3}, + {"reuse.q", "", 3}, {"return.q", "", 6}, {"reassign.q", "", 2}, {"branch.q", "", 0},