aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-13 17:30:52 +0800
committerobscuren <geffobscura@gmail.com>2015-01-13 17:30:52 +0800
commit4704a0a288af89795e251db98eb253de117ff031 (patch)
treed6e975352b20a3c23a6af453c45b87b1e2d976ae /tests/vm
parent5b561f434d888b750bb9b29726a86d664ac89660 (diff)
downloadgo-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar
go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.gz
go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.bz2
go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.lz
go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.xz
go-tangerine-4704a0a288af89795e251db98eb253de117ff031.tar.zst
go-tangerine-4704a0a288af89795e251db98eb253de117ff031.zip
remove pre compiled for tests
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/gh_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index 699225e90..7b41411de 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -79,6 +79,7 @@ func RunVmTest(p string, t *testing.T) {
helper.CreateFileTests(t, p, &tests)
for name, test := range tests {
+ //helper.Log.Infoln("Running", name)
db, _ := ethdb.NewMemDatabase()
statedb := state.New(nil, db)
for addr, account := range test.Pre {
@@ -116,12 +117,6 @@ func RunVmTest(p string, t *testing.T) {
ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction)
}
- // Log the error if there is one. Error does not mean failing test.
- // A test fails if err != nil and post params are specified in the test.
- if err != nil {
- helper.Log.Infof("%s's: %v\n", name, err)
- }
-
rexp := helper.FromHex(test.Out)
if bytes.Compare(rexp, ret) != 0 {
t.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret)
@@ -129,10 +124,14 @@ func RunVmTest(p string, t *testing.T) {
if isVmTest {
if len(test.Gas) == 0 && err == nil {
+ // Log VM err
+ helper.Log.Infof("%s's: %v\n", name, err)
t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull", name)
} else {
gexp := ethutil.Big(test.Gas)
if gexp.Cmp(gas) != 0 {
+ // Log VM err
+ helper.Log.Infof("%s's: %v\n", name, err)
t.Errorf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas)
}
}