From 4a7bb9500ac8024ede989c43452c0e9cdfdea9ef Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 9 Jul 2024 10:39:29 +0200 Subject: [PATCH] Added more tests --- tests/programs/reuse.q | 7 +++++++ tests/programs_test.go | 1 + 2 files changed, 8 insertions(+) create mode 100644 tests/programs/reuse.q 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},