diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-30 18:58:37 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-30 18:58:37 +0800 |
commit | 6625b6ffbdb93a47de2187198d6e826fb32c1ba6 (patch) | |
tree | f61c2d9e13b8e208bd7c9032db6ccbaa90fde08e /ethchain/vm_test.go | |
parent | b888652201277ab86e9e8c280e75e23ced5e3d38 (diff) | |
download | dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.tar dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.tar.gz dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.tar.bz2 dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.tar.lz dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.tar.xz dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.tar.zst dexon-6625b6ffbdb93a47de2187198d6e826fb32c1ba6.zip |
Changed to new mutan API
Diffstat (limited to 'ethchain/vm_test.go')
-rw-r--r-- | ethchain/vm_test.go | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/ethchain/vm_test.go b/ethchain/vm_test.go index c802420cb..589f0bf4a 100644 --- a/ethchain/vm_test.go +++ b/ethchain/vm_test.go @@ -81,18 +81,21 @@ func TestRun4(t *testing.T) { db, _ := ethdb.NewMemDatabase() state := NewState(ethutil.NewTrie(db, "")) - mutan.NewCompiler().Compile(strings.NewReader(` -a = 1337 -c = 1 -store[0] = 50 -d = store[0] -`)) - - asm, _ := mutan.NewCompiler().Compile(strings.NewReader(` - a = 3 + 3 - store[1000] = a - store[1000] -`)) + 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] + `), false) + if err != nil { + fmt.Println(err) + } asm = append(asm, "LOG") fmt.Println(asm) |