From c45c0d9f00e56abf51155e984675d7d12500ecfe Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 31 May 2022 01:10:45 +0000 Subject: Call args fix in tests and better error message --- pkg/lang/vm/vm_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 287e7a8..c0b5c2e 100644 --- a/pkg/lang/vm/vm_test.go +++ b/pkg/lang/vm/vm_test.go @@ -96,7 +96,7 @@ func TestFunction(t *testing.T) { src := ` push_int 44 push_function @subtract_two - call + call 1 halt @subtract_two: @@ -119,7 +119,7 @@ func TestSimpleEnv(t *testing.T) { push_function @test # Add the local 1 to the environment. add_to_env 1 - call + call 0 halt @test: @@ -148,22 +148,22 @@ func TestEscapedEnv(t *testing.T) { src := ` push_function @create - call + call 0 push_array get_local 0 - call + call 0 get_local 1 temp_arr_push get_local 0 - call + call 0 get_local 1 temp_arr_push get_local 0 - call + call 0 get_local 1 temp_arr_push halt @@ -204,7 +204,7 @@ func TestMember(t *testing.T) { temp_arr_push get_member "length" - call + call 0 ` test(t, src, "3") -- cgit 1.4.1