diff options
| author | Marc Vertes <mvertes@free.fr> | 2024-03-11 08:46:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-11 08:46:20 +0100 |
| commit | 73eb1891da7171f2bea0d3eb36e3458f267e6f19 (patch) | |
| tree | feacda8284413bcf2e7f5c712882cfe41ebe1594 /vm/vm_test.go | |
| parent | e02428ebd435dd2366231918f2388ab4fccf50c8 (diff) | |
| parent | 8c4fa9d85cd274439dbd7d0a5c699fe1cea557dc (diff) | |
Merge pull request #2 from mvertes/vm-type
feat: add type representation in vm package
Diffstat (limited to 'vm/vm_test.go')
| -rw-r--r-- | vm/vm_test.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/vm/vm_test.go b/vm/vm_test.go index 07c063e..fb71176 100644 --- a/vm/vm_test.go +++ b/vm/vm_test.go @@ -3,7 +3,6 @@ package vm import ( "fmt" "log" - "reflect" "testing" ) @@ -50,11 +49,10 @@ func BenchmarkVM(b *testing.B) { } var tests = []struct { - //sym []any // initial memory values - sym []reflect.Value // initial memory values - code [][]int64 // bytecode to execute - start, end int // - mem string // expected memory content + sym []Value // initial memory values + code [][]int64 // bytecode to execute + start, end int // + mem string // expected memory content }{{ // #00 -- A simple addition. code: [][]int64{ {0, Push, 1}, @@ -64,7 +62,7 @@ var tests = []struct { }, start: 0, end: 1, mem: "[3]", }, { // #01 -- Calling a function defined outside the VM. - sym: []reflect.Value{reflect.ValueOf(fmt.Println), reflect.ValueOf("Hello")}, + sym: []Value{ValueOf(fmt.Println), ValueOf("Hello")}, code: [][]int64{ {0, Dup, 0}, {0, CallX, 1}, |
