aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-09 02:45:39 +0800
committerobscuren <geffobscura@gmail.com>2015-04-09 02:45:39 +0800
commita7750c929b926d164195fd4f7a7e2b4642c66173 (patch)
tree81c104392bfa148e3c8cfc764eb9e152ff64c408 /tests/vm
parentf08e9cbe42dcb067affe0ca1077285ba1b583c95 (diff)
downloaddexon-a7750c929b926d164195fd4f7a7e2b4642c66173.tar
dexon-a7750c929b926d164195fd4f7a7e2b4642c66173.tar.gz
dexon-a7750c929b926d164195fd4f7a7e2b4642c66173.tar.bz2
dexon-a7750c929b926d164195fd4f7a7e2b4642c66173.tar.lz
dexon-a7750c929b926d164195fd4f7a7e2b4642c66173.tar.xz
dexon-a7750c929b926d164195fd4f7a7e2b4642c66173.tar.zst
dexon-a7750c929b926d164195fd4f7a7e2b4642c66173.zip
Fixed tests to reflect log changes
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/gh_test.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index a96a3eba6..a5bc273f3 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -9,10 +9,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/tests/helper"
)
@@ -82,13 +80,15 @@ func RunVmTest(p string, t *testing.T) {
tests := make(map[string]VmTest)
helper.CreateFileTests(t, p, &tests)
- vm.Debug = true
- glog.SetV(4)
- glog.SetToStderr(true)
for name, test := range tests {
- if name != "stackLimitPush32_1024" {
- continue
- }
+ /*
+ vm.Debug = true
+ glog.SetV(4)
+ glog.SetToStderr(true)
+ if name != "stackLimitPush32_1024" {
+ continue
+ }
+ */
db, _ := ethdb.NewMemDatabase()
statedb := state.New(common.Hash{}, db)
for addr, account := range test.Pre {
@@ -182,20 +182,20 @@ func RunVmTest(p string, t *testing.T) {
t.Errorf("log length mismatch. Expected %d, got %d", len(test.Logs), len(logs))
} else {
for i, log := range test.Logs {
- if common.HexToAddress(log.AddressF) != logs[i].Address() {
- t.Errorf("'%s' log address expected %v got %x", name, log.AddressF, logs[i].Address())
+ if common.HexToAddress(log.AddressF) != logs[i].Address {
+ t.Errorf("'%s' log address expected %v got %x", name, log.AddressF, logs[i].Address)
}
- if !bytes.Equal(logs[i].Data(), helper.FromHex(log.DataF)) {
- t.Errorf("'%s' log data expected %v got %x", name, log.DataF, logs[i].Data())
+ if !bytes.Equal(logs[i].Data, helper.FromHex(log.DataF)) {
+ t.Errorf("'%s' log data expected %v got %x", name, log.DataF, logs[i].Data)
}
- if len(log.TopicsF) != len(logs[i].Topics()) {
- t.Errorf("'%s' log topics length expected %d got %d", name, len(log.TopicsF), logs[i].Topics())
+ if len(log.TopicsF) != len(logs[i].Topics) {
+ t.Errorf("'%s' log topics length expected %d got %d", name, len(log.TopicsF), logs[i].Topics)
} else {
for j, topic := range log.TopicsF {
- if common.HexToHash(topic) != logs[i].Topics()[j] {
- t.Errorf("'%s' log topic[%d] expected %v got %x", name, j, topic, logs[i].Topics()[j])
+ if common.HexToHash(topic) != logs[i].Topics[j] {
+ t.Errorf("'%s' log topic[%d] expected %v got %x", name, j, topic, logs[i].Topics[j])
}
}
}