diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-03 11:55:38 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-03 11:55:38 +0800 |
commit | 6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a (patch) | |
tree | 4d6f8855877013bf6a4420ffc78cf782b0a3e737 /tests/vm | |
parent | 8ccde784f9035c0a7a8f234994538c817c5b9de7 (diff) | |
download | dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.gz dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.bz2 dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.lz dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.xz dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.tar.zst dexon-6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a.zip |
Updated tests
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/gh_test.go | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go index 41ebba957..d9b1ded7a 100644 --- a/tests/vm/gh_test.go +++ b/tests/vm/gh_test.go @@ -79,6 +79,10 @@ 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 + } db, _ := ethdb.NewMemDatabase() statedb := state.New(nil, db) for addr, account := range test.Pre { @@ -123,14 +127,10 @@ func RunVmTest(p string, t *testing.T) { if isVmTest { if len(test.Gas) == 0 && err == nil { - // Log VM err - helper.Log.Infof("%s's: %v\n", name, err) t.Errorf("%s's gas unspecified, indicating an error. VM returned (incorrectly) successfull", name) } else { gexp := ethutil.Big(test.Gas) if gexp.Cmp(gas) != 0 { - // Log VM err - helper.Log.Infof("%s's: %v\n", name, err) t.Errorf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas) } } @@ -176,6 +176,11 @@ 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) @@ -240,3 +245,23 @@ func TestStateRefund(t *testing.T) { const fn = "../files/StateTests/stRefundTest.json" RunVmTest(fn, t) } + +func TestStateBlockHash(t *testing.T) { + const fn = "../files/StateTests/stBlockHashTest.json" + RunVmTest(fn, t) +} + +func TestStateInitCode(t *testing.T) { + const fn = "../files/StateTests/stInitCodeTest.json" + RunVmTest(fn, t) +} + +func TestStateLog(t *testing.T) { + const fn = "../files/StateTests/stLogTests.json" + RunVmTest(fn, t) +} + +func TestStateTransaction(t *testing.T) { + const fn = "../files/StateTests/stTransactionTest.json" + RunVmTest(fn, t) +} |