aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-03 00:55:45 +0800
committerobscuren <geffobscura@gmail.com>2015-03-03 00:55:45 +0800
commit200f66537cdf21a69ddda74eedfee30c14fb6ba6 (patch)
tree02861804635a9e132b3d5a17e464e361950af21f /tests
parent0823254c3bc2560f8e0dd6f19d05f471f8af94f4 (diff)
downloadgo-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.tar
go-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.tar.gz
go-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.tar.bz2
go-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.tar.lz
go-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.tar.xz
go-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.tar.zst
go-tangerine-200f66537cdf21a69ddda74eedfee30c14fb6ba6.zip
updated tests
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/gh_test.go38
1 files changed, 25 insertions, 13 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index 2151cf9a5..a23076b74 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -79,10 +79,12 @@ func RunVmTest(p string, t *testing.T) {
helper.CreateFileTests(t, p, &tests)
for name, test := range tests {
- helper.Logger.SetLogLevel(4)
- if name != "TransactionNonceCheck2" {
- continue
- }
+ /*
+ helper.Logger.SetLogLevel(4)
+ if name != "log1_nonEmptyMem_logMemSize1_logMemStart31" {
+ continue
+ }
+ */
db, _ := ethdb.NewMemDatabase()
statedb := state.New(nil, db)
for addr, account := range test.Pre {
@@ -159,10 +161,14 @@ func RunVmTest(p string, t *testing.T) {
}
if len(test.Logs) > 0 {
- for i, log := range test.Logs {
- genBloom := ethutil.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 64)
- if !bytes.Equal(genBloom, ethutil.Hex2Bytes(log.BloomF)) {
- t.Errorf("bloom mismatch")
+ if len(test.Logs) != len(logs) {
+ t.Errorf("log length mismatch. Expected %d, got %d", len(test.Logs), len(logs))
+ } else {
+ for i, log := range test.Logs {
+ genBloom := ethutil.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 64)
+ if !bytes.Equal(genBloom, ethutil.Hex2Bytes(log.BloomF)) {
+ t.Errorf("bloom mismatch")
+ }
}
}
}
@@ -176,11 +182,6 @@ func TestVMArithmetic(t *testing.T) {
RunVmTest(fn, t)
}
-func TestSystemOperations(t *testing.T) {
- const fn = "../files/VMTests/vmSystemOperationsTest.json"
- RunVmTest(fn, t)
-}
-
func TestBitwiseLogicOperation(t *testing.T) {
const fn = "../files/VMTests/vmBitwiseLogicOperationTest.json"
RunVmTest(fn, t)
@@ -201,6 +202,17 @@ func TestFlowOperation(t *testing.T) {
RunVmTest(fn, t)
}
+func TestLogTest(t *testing.T) {
+ const fn = "../files/VMTests/vmLogTest.json"
+ RunVmTest(fn, t)
+}
+
+func TestPerformance(t *testing.T) {
+ t.Skip()
+ const fn = "../files/VMTests/vmPerformance.json"
+ RunVmTest(fn, t)
+}
+
func TestPushDupSwap(t *testing.T) {
const fn = "../files/VMTests/vmPushDupSwapTest.json"
RunVmTest(fn, t)