aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-03-31 00:55:51 +0800
committerobscuren <geffobscura@gmail.com>2014-03-31 00:55:51 +0800
commit205e33bc831bb44f41dc899ae41bbfe0e44ddc5d (patch)
treece6c3dcafa0d02417058fe5ea0a6091f16a90fc0 /ethchain/vm_test.go
parent6625b6ffbdb93a47de2187198d6e826fb32c1ba6 (diff)
downloadgo-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.tar
go-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.tar.gz
go-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.tar.bz2
go-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.tar.lz
go-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.tar.xz
go-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.tar.zst
go-tangerine-205e33bc831bb44f41dc899ae41bbfe0e44ddc5d.zip
Fixed bug in stack to expand beyond expectations. Fixed EQ and NOT opcode
Diffstat (limited to 'ethchain/vm_test.go')
-rw-r--r--ethchain/vm_test.go21
1 files changed, 9 insertions, 12 deletions
diff --git a/ethchain/vm_test.go b/ethchain/vm_test.go
index 589f0bf4a..e3880d26e 100644
--- a/ethchain/vm_test.go
+++ b/ethchain/vm_test.go
@@ -1,7 +1,7 @@
package ethchain
import (
- "bytes"
+ _ "bytes"
"fmt"
"github.com/ethereum/eth-go/ethdb"
"github.com/ethereum/eth-go/ethutil"
@@ -11,6 +11,7 @@ import (
"testing"
)
+/*
func TestRun3(t *testing.T) {
ethutil.ReadConfig("")
@@ -73,7 +74,7 @@ func TestRun3(t *testing.T) {
if bytes.Compare(ret, exp) != 0 {
t.Errorf("expected return value to be %v, got %v", exp, ret)
}
-}
+}*/
func TestRun4(t *testing.T) {
ethutil.ReadConfig("")
@@ -81,17 +82,13 @@ func TestRun4(t *testing.T) {
db, _ := ethdb.NewMemDatabase()
state := NewState(ethutil.NewTrie(db, ""))
- mutan.Compile(strings.NewReader(`
- a = 1337
- c = 1
- store[0] = 50
- d = store[0]
- `), false)
-
asm, err := mutan.Compile(strings.NewReader(`
- a = 3 + 3
- store[1000] = a
- store[1000]
+ a = 10
+ b = 10
+ if a == b {
+ b = 1000
+ c = 10
+ }
`), false)
if err != nil {
fmt.Println(err)