aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-10 18:47:37 +0800
committerobscuren <geffobscura@gmail.com>2014-11-10 18:47:37 +0800
commitd30571a7a84de5a1a3287e764210a3803d7a307f (patch)
tree941126756bb727bf3b02577f38f386ec18e0d372 /vm/vm_test.go
parentcbeebcd47da846e1b8990313f1ff1ffe7d0bf00f (diff)
downloadgo-tangerine-d30571a7a84de5a1a3287e764210a3803d7a307f.tar.gz
go-tangerine-d30571a7a84de5a1a3287e764210a3803d7a307f.tar.zst
go-tangerine-d30571a7a84de5a1a3287e764210a3803d7a307f.zip
Added VM testing tool
Diffstat (limited to 'vm/vm_test.go')
-rw-r--r--vm/vm_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/vm/vm_test.go b/vm/vm_test.go
index f5d77cbff..948dd835f 100644
--- a/vm/vm_test.go
+++ b/vm/vm_test.go
@@ -169,3 +169,21 @@ func TestBuildInRipemd(t *testing.T) {
t.Errorf("Expected %x, got %x", exp, ret)
}
}
+
+func TestOog(t *testing.T) {
+ // This tests takes a long time and will eventually run out of gas
+ //t.Skip()
+
+ logger.AddLogSystem(logger.NewStdLogSystem(os.Stdout, log.LstdFlags, logger.InfoLevel))
+
+ ethutil.ReadConfig(".ethtest", "/tmp/ethtest", "")
+
+ stateObject := state.NewStateObject([]byte{'j', 'e', 'f', 'f'})
+ closure := NewClosure(nil, stateObject, stateObject, ethutil.Hex2Bytes("60ff60ff600057"), big.NewInt(1000000), big.NewInt(0))
+
+ vm := New(TestEnv{}, DebugVmTy)
+ _, _, e := closure.Call(vm, nil)
+ if e != nil {
+ fmt.Println(e)
+ }
+}