summaryrefslogtreecommitdiff
path: root/vm1/vm_test.go
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2023-08-25 11:21:49 +0200
committerMarc Vertes <mvertes@free.fr>2023-08-25 11:21:49 +0200
commita3ab9ef5be74cb54a87674aa48abb0c46f9c58f6 (patch)
tree570f7a776ca02d3da467d7afc84232397ba91d17 /vm1/vm_test.go
parent706ca65800dfab293a0210b56602e1e9f8076fcc (diff)
chore: appease lint and vet
Diffstat (limited to 'vm1/vm_test.go')
-rw-r--r--vm1/vm_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/vm1/vm_test.go b/vm1/vm_test.go
index cea4f29..257ac44 100644
--- a/vm1/vm_test.go
+++ b/vm1/vm_test.go
@@ -14,7 +14,9 @@ func TestVM(t *testing.T) {
m.Push(v)
}
m.PushCode(test.code)
- m.Run()
+ if err := m.Run(); err != nil {
+ t.Errorf("run error: %v", err)
+ }
t.Log(m.mem)
r := fmt.Sprintf("%v", m.mem[test.start:test.end])
if r != test.mem {
@@ -34,7 +36,9 @@ func BenchmarkVM(b *testing.B) {
m.PushCode(test.code)
b.StartTimer()
- m.Run()
+ if err := m.Run(); err != nil {
+ b.Errorf("run error: %v", err)
+ }
}
})
}