VM globals
Some checks failed
Build / build (push) Failing after 1m50s
Test / build (push) Failing after 1m25s

This commit is contained in:
Chuck Smith
2024-02-20 16:24:59 -05:00
parent e8254fc996
commit 8caeaca559
4 changed files with 54 additions and 2 deletions

View File

@@ -165,3 +165,13 @@ func TestConditionals(t *testing.T) {
runVmTests(t, tests)
}
func TestGlobalLetStatements(t *testing.T) {
tests := []vmTestCase{
{"let one = 1; one", 1},
{"let one = 1; let two = 2; one + two", 3},
{"let one = 1; let two = one + one; one + two", 3},
}
runVmTests(t, tests)
}