add vm tests

This commit is contained in:
2026-02-05 10:29:09 -06:00
parent b86cd042fc
commit b29d3c2fe0
8 changed files with 10 additions and 0 deletions

3
vm_test/comment.txt Normal file
View File

@@ -0,0 +1,3 @@
// simple test that comments work
var x = 5
// other comment

1
vm_test/do_while.txt Normal file
View File

@@ -0,0 +1 @@
var i = 0; do { i = i + 1 } while (i < 3); i

View File

@@ -0,0 +1 @@
var s = 0; var i = 0; do { i = i + 1; if (i == 2) continue; s = s + i } while (i < 5); s

1
vm_test/for_break.txt Normal file
View File

@@ -0,0 +1 @@
var s = 0; for (var i = 0; i < 10; i++) { if (i == 4) break; s = s + i }; s

1
vm_test/for_continue.txt Normal file
View File

@@ -0,0 +1 @@
var s = 0; for (var i = 0; i < 5; i++) { if (i == 2) continue; s = s + i }; s

View File

@@ -0,0 +1 @@
print("a")

1
vm_test/while_break.txt Normal file
View File

@@ -0,0 +1 @@
var i = 0; while (i < 10) { i = i + 1; if (i == 5) break }; i

View File

@@ -0,0 +1 @@
var s = 0; var i = 0; while (i < 5) { i = i + 1; if (i == 3) continue; s = s + i }; s