aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:38:17 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:38:17 +0800
commit8d3faf69d00420b80d4d737e618b2c7791c10ae9 (patch)
tree4d679f2abf30bd948c46719dd7220a91294f8a27
parentbaea8e87e5dfdcfb7b2fdcef48fa6038d60a6f9c (diff)
downloadgo-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar
go-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.gz
go-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.bz2
go-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.lz
go-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.xz
go-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.tar.zst
go-tangerine-8d3faf69d00420b80d4d737e618b2c7791c10ae9.zip
Build error fixes
-rwxr-xr-xbuild/test-global-coverage.sh2
-rw-r--r--tests/state_test_util.go9
-rw-r--r--tests/vm_test_util.go2
3 files changed, 6 insertions, 7 deletions
diff --git a/build/test-global-coverage.sh b/build/test-global-coverage.sh
index 417c829f4..5bb233a31 100755
--- a/build/test-global-coverage.sh
+++ b/build/test-global-coverage.sh
@@ -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
diff --git a/tests/state_test_util.go b/tests/state_test_util.go
index ad3aeea6c..835ba44f4 100644
--- a/tests/state_test_util.go
+++ b/tests/state_test_util.go
@@ -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())
}
diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go
index 9fccafd8e..afeedda2a 100644
--- a/tests/vm_test_util.go
+++ b/tests/vm_test_util.go
@@ -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)