var type checking, fix importing, fix creating empty lists, repl command, dynamic stacks

This commit is contained in:
Neemek 2025-04-18 09:33:39 +02:00
parent f633a02c32
commit 5bcab07681
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
11 changed files with 407 additions and 284 deletions

View file

@ -76,13 +76,13 @@ func TestNewVM(t *testing.T) {
}
// should have given stack size
if vm.stack.Size != stackSize {
t.Errorf("vm.stack.Size = %d, want %d", vm.stack.Size, stackSize)
if vm.stack.Capacity != stackSize {
t.Errorf("vm.stack.Capacity = %d, want %d", vm.stack.Capacity, stackSize)
}
// should have given call stack size
if vm.call.Size != callstackSize {
t.Errorf("vm.call.Size = %d, want %d", vm.call.Size, callstackSize)
if vm.call.Capacity != callstackSize {
t.Errorf("vm.call.Capacity = %d, want %d", vm.call.Capacity, callstackSize)
}
}