diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-06-11 05:04:06 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-06-19 04:20:44 +0800 |
commit | ac0637c41332de1f49fb0955f4fbe0fb908a77d5 (patch) | |
tree | 9e87e69656cc317f300ba59692eeb525a230f0bf /tests/state_test_util.go | |
parent | b6d40a931286b4c998f58ad074db0a692aeace6e (diff) | |
download | dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.gz dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.bz2 dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.lz dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.xz dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.zst dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.zip |
More consistent test interfaces + test skipping
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r-- | tests/state_test_util.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 29d7cebe8..b507de47f 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -15,19 +15,19 @@ import ( ) func RunStateTest(p string) error { + skipTest := make(map[string]bool, len(stateSkipTests)) + for _, name := range stateSkipTests { + skipTest[name] = true + } tests := make(map[string]VmTest) CreateFileTests(p, &tests) for name, test := range tests { - /* - vm.Debug = true - glog.SetV(4) - glog.SetToStderr(true) - if name != "Call50000_sha256" { - continue - } - */ + if skipTest[name] { + fmt.Println("Skipping state test", name) + return nil + } db, _ := ethdb.NewMemDatabase() statedb := state.New(common.Hash{}, db) for addr, account := range test.Pre { @@ -60,17 +60,17 @@ func RunStateTest(p string) error { ret, logs, _, _ = RunState(statedb, env, test.Transaction) - // Compare expected and actual return - switch name { - // the memory required for these tests (4294967297 bytes) would take too much time. - // on 19 May 2015 decided to skip these tests their output. - case "mload32bitBound_return", "mload32bitBound_return2": - default: - rexp := common.FromHex(test.Out) - if bytes.Compare(rexp, ret) != 0 { - return fmt.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret) - } + // // Compare expected and actual return + // switch name { + // // the memory required for these tests (4294967297 bytes) would take too much time. + // // on 19 May 2015 decided to skip these tests their output. + // case "mload32bitBound_return", "mload32bitBound_return2": + // default: + rexp := common.FromHex(test.Out) + if bytes.Compare(rexp, ret) != 0 { + return fmt.Errorf("%s's return failed. Expected %x, got %x\n", name, rexp, ret) } + // } // check post state for addr, account := range test.Post { |