From 74dd678dfd1aae9e655fd13cb65278ea9ba307e2 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 11 Jul 2022 11:07:51 +0200 Subject: Reimplement argument counts --- pkg/lang/vm/vm_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pkg/lang/vm/vm_test.go') diff --git a/pkg/lang/vm/vm_test.go b/pkg/lang/vm/vm_test.go index fa43b02..7fe07dd 100644 --- a/pkg/lang/vm/vm_test.go +++ b/pkg/lang/vm/vm_test.go @@ -91,18 +91,15 @@ func TestFibonacci(t *testing.T) { } func TestFunction(t *testing.T) { - t.Skip("Reimplement arguments") - src := ` - push_int 44 push_function @subtract_two + set_arg_count 1 + push_int 44 call 1 halt @subtract_two: - shift 1 push_int 2 - get_local 0 sub ret ` @@ -255,6 +252,7 @@ func TestTypeConstruct(t *testing.T) { push_string "$init" push_function @Cat:$init + set_arg_count 2 call 2 -- cgit 1.4.1