VM improvements, tests + bugfixes (#61)
* changed vm commands to match more of the standard * fixed Uint16 jmp bug in VM * moved test to vm + fixed numnotequal bug * fixed broken tests * moved compiler tests to vm tests * added basic for support + inc and dec stmts * bumped version
This commit is contained in:
parent
931388b687
commit
69c3e645b6
20 changed files with 521 additions and 159 deletions
18
pkg/vm/test/numeric_test.go
Normal file
18
pkg/vm/test/numeric_test.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package vm_test
|
||||
|
||||
import "math/big"
|
||||
|
||||
var numericTestCases = []testCase{
|
||||
{
|
||||
"add",
|
||||
`
|
||||
package foo
|
||||
func Main() int {
|
||||
x := 2
|
||||
y := 4
|
||||
return x + y
|
||||
}
|
||||
`,
|
||||
big.NewInt(6),
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue