Skip to content

Commit

Permalink
Build error fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgerring committed Jun 18, 2015
1 parent baea8e8 commit 8d3faf6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/test-global-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for pkg in $(go list ./...); do
# drop the namespace prefix.
dir=${pkg##github.com/ethereum/go-ethereum/}

if [[ $dir != "tests/vm" ]]; then
if [[ $dir != "tests" ]]; then
go test -covermode=count -coverprofile=$dir/profile.tmp $pkg
fi
if [[ -f $dir/profile.tmp ]]; then
Expand Down
9 changes: 4 additions & 5 deletions tests/state_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,16 @@ func runStateTest(test VmTest) error {
}

for addr, value := range account.Storage {
v := obj.GetState(common.HexToHash(addr)).Bytes()
vexp := common.FromHex(value)
v := obj.GetState(common.HexToHash(addr))
vexp := common.HexToHash(value)

if bytes.Compare(v, vexp) != 0 {
return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", obj.Address().Bytes()[0:4], addr, vexp, v, common.BigD(vexp), common.BigD(v))
if v != vexp {
return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", obj.Address().Bytes()[0:4], addr, vexp, v, vexp.Big(), v.Big())
}
}
}

statedb.Sync()
//if !bytes.Equal(common.Hex2Bytes(test.PostStateRoot), statedb.Root()) {
if common.HexToHash(test.PostStateRoot) != statedb.Root() {
return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root())
}
Expand Down
2 changes: 1 addition & 1 deletion tests/vm_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func runVmTest(test VmTest) error {

ret, logs, gas, err = RunVm(statedb, env, test.Exec)

// Compare expectedand actual return
// Compare expected and actual return
rexp := common.FromHex(test.Out)
if bytes.Compare(rexp, ret) != 0 {
return fmt.Errorf("return failed. Expected %x, got %x\n", rexp, ret)
Expand Down

0 comments on commit 8d3faf6

Please sign in to comment.