about summary refs log tree commit diff
path: root/pkg/lang/compiler/compiler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/compiler/compiler_test.go')
-rw-r--r--pkg/lang/compiler/compiler_test.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/lang/compiler/compiler_test.go b/pkg/lang/compiler/compiler_test.go
index 326ad68..f3a20a5 100644
--- a/pkg/lang/compiler/compiler_test.go
+++ b/pkg/lang/compiler/compiler_test.go
@@ -302,17 +302,17 @@ func TestForIn(t *testing.T) {
 	push_array
 
 	get_local 0
-	get_member "$push"
+	get_member "push"
 	push_int 1
 	call 1
 
 	get_local 0
-	get_member "$push"
+	get_member "push"
 	push_int 2
 	call 1
 
 	get_local 0
-	get_member "$push"
+	get_member "push"
 	push_int 3
 	call 1
 
@@ -322,7 +322,7 @@ func TestForIn(t *testing.T) {
 	@check:
 	get_local 1
 	get_local 0
-	get_member "$length"
+	get_member "length"
 	call 0
 	lt
 
@@ -333,6 +333,11 @@ func TestForIn(t *testing.T) {
 	index
 	set_local 2
 
+	get_local 1
+	push_int 1
+	add
+	set_local 1
+
 	push_string "say"
 	get_local 2
 	call 1