Additional comments and added name to error output
This commit is contained in:
parent
4547a05a68
commit
a4dc12f12c
@ -108,17 +108,16 @@ func RunVmTest(p string, t *testing.T) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
isVmTest := len(test.Exec) > 0
|
isVmTest := len(test.Exec) > 0
|
||||||
|
|
||||||
if isVmTest {
|
if isVmTest {
|
||||||
ret, logs, gas, err = helper.RunVm(statedb, env, test.Exec)
|
ret, logs, gas, err = helper.RunVm(statedb, env, test.Exec)
|
||||||
} else {
|
} else {
|
||||||
ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction)
|
ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction)
|
||||||
}
|
}
|
||||||
|
|
||||||
// When an error is returned it doesn't always mean the tests fails.
|
// Log the error if there is one. Error does not mean failing test.
|
||||||
// Have to come up with some conditional failing mechanism.
|
// A test fails if err != nil and post params are specified in the test.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
helper.Log.Infoln(err)
|
helper.Log.Infof("%s's: %v\n", name, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
rexp := helper.FromHex(test.Out)
|
rexp := helper.FromHex(test.Out)
|
||||||
@ -160,7 +159,6 @@ func RunVmTest(p string, t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(test.Logs) > 0 {
|
if len(test.Logs) > 0 {
|
||||||
// Logs within the test itself aren't correct, missing empty fields (32 0s)
|
|
||||||
for i, log := range test.Logs {
|
for i, log := range test.Logs {
|
||||||
genBloom := ethutil.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 64)
|
genBloom := ethutil.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 64)
|
||||||
if !bytes.Equal(genBloom, ethutil.Hex2Bytes(log.BloomF)) {
|
if !bytes.Equal(genBloom, ethutil.Hex2Bytes(log.BloomF)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user