aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-03 19:21:27 +0800
committerobscuren <geffobscura@gmail.com>2015-03-03 19:21:27 +0800
commit1650b59cd93a29ea54328656a9318ffb10889ae5 (patch)
treea95c2577603905d6fed98a598e369d131400d48d /tests
parentbf5365b317ba5767feb28eef9abb83328bfea099 (diff)
downloaddexon-1650b59cd93a29ea54328656a9318ffb10889ae5.tar
dexon-1650b59cd93a29ea54328656a9318ffb10889ae5.tar.gz
dexon-1650b59cd93a29ea54328656a9318ffb10889ae5.tar.bz2
dexon-1650b59cd93a29ea54328656a9318ffb10889ae5.tar.lz
dexon-1650b59cd93a29ea54328656a9318ffb10889ae5.tar.xz
dexon-1650b59cd93a29ea54328656a9318ffb10889ae5.tar.zst
dexon-1650b59cd93a29ea54328656a9318ffb10889ae5.zip
Delet => Delete
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/gh_test.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index 4d6319fd1..fdc82179f 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -64,14 +64,15 @@ type Env struct {
type VmTest struct {
Callcreates interface{}
//Env map[string]string
- Env Env
- Exec map[string]string
- Transaction map[string]string
- Logs []Log
- Gas string
- Out string
- Post map[string]Account
- Pre map[string]Account
+ Env Env
+ Exec map[string]string
+ Transaction map[string]string
+ Logs []Log
+ Gas string
+ Out string
+ Post map[string]Account
+ Pre map[string]Account
+ PostStateRoot string
}
func RunVmTest(p string, t *testing.T) {
@@ -154,6 +155,12 @@ func RunVmTest(p string, t *testing.T) {
}
}
+ if !isVmTest {
+ if !bytes.Equal(ethutil.Hex2Bytes(test.PostStateRoot), statedb.Root()) {
+ t.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root())
+ }
+ }
+
if len(test.Logs) > 0 {
if len(test.Logs) != len(logs) {
t.Errorf("log length mismatch. Expected %d, got %d", len(test.Logs), len(logs))