aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm_test_util.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-11 01:00:54 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:15:07 +0800
commit1b26d4f220689dac18d560a4c1ecb3b29d99deb0 (patch)
tree66bed6c2091770fc58476299691204bb30efb7a5 /tests/vm_test_util.go
parente82100367f794856a8807b5fcfe9f0043902a294 (diff)
downloadgo-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.tar
go-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.tar.gz
go-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.tar.bz2
go-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.tar.lz
go-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.tar.xz
go-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.tar.zst
go-tangerine-1b26d4f220689dac18d560a4c1ecb3b29d99deb0.zip
Flatten helper directory
Diffstat (limited to 'tests/vm_test_util.go')
-rw-r--r--tests/vm_test_util.go15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/vm_test_util.go b/tests/vm_test_util.go
index f91070736..cf95db80f 100644
--- a/tests/vm_test_util.go
+++ b/tests/vm_test_util.go
@@ -11,7 +11,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/tests/helper"
)
type Account struct {
@@ -52,7 +51,7 @@ func StateObjectFromAccount(db common.Database, addr string, account Account) *s
return obj
}
-type Env struct {
+type VmEnv struct {
CurrentCoinbase string
CurrentDifficulty string
CurrentGasLimit string
@@ -64,7 +63,7 @@ type Env struct {
type VmTest struct {
Callcreates interface{}
//Env map[string]string
- Env Env
+ Env VmEnv
Exec map[string]string
Transaction map[string]string
Logs []Log
@@ -78,7 +77,7 @@ type VmTest struct {
func RunVmTest(p string, t *testing.T) {
tests := make(map[string]VmTest)
- helper.CreateFileTests(t, p, &tests)
+ CreateFileTests(t, p, &tests)
for name, test := range tests {
/*
@@ -121,9 +120,9 @@ func RunVmTest(p string, t *testing.T) {
isVmTest := len(test.Exec) > 0
if isVmTest {
- ret, logs, gas, err = helper.RunVm(statedb, env, test.Exec)
+ ret, logs, gas, err = RunVm(statedb, env, test.Exec)
} else {
- ret, logs, gas, err = helper.RunState(statedb, env, test.Transaction)
+ ret, logs, gas, err = RunState(statedb, env, test.Transaction)
}
switch name {
@@ -131,7 +130,7 @@ func RunVmTest(p string, t *testing.T) {
// on 19 May 2015 decided to skip these tests their output.
case "mload32bitBound_return", "mload32bitBound_return2":
default:
- rexp := helper.FromHex(test.Out)
+ rexp := common.FromHex(test.Out)
if bytes.Compare(rexp, ret) != 0 {
t.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret)
}
@@ -192,7 +191,7 @@ func RunVmTest(p string, t *testing.T) {
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)) {
+ if !bytes.Equal(logs[i].Data, common.FromHex(log.DataF)) {
t.Errorf("'%s' log data expected %v got %x", name, log.DataF, logs[i].Data)
}