(t *testing.T)
| 27 | ) |
| 28 | |
| 29 | func TestState(t *testing.T) { |
| 30 | configs.SetRunMode(configs.Testcase) |
| 31 | |
| 32 | t.Parallel() |
| 33 | |
| 34 | st := new(testMatcher) |
| 35 | // Long tests: |
| 36 | st.skipShortMode(`^stQuadraticComplexityTest/`) |
| 37 | // Broken tests: |
| 38 | st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits |
| 39 | st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet |
| 40 | // Expected failures: |
| 41 | st.fails(`^stRevertTest/RevertPrecompiledTouch\.json/EIP158`, "bug in test") |
| 42 | st.fails(`^stRevertTest/RevertPrecompiledTouch\.json/Byzantium`, "bug in test") |
| 43 | |
| 44 | st.walk(t, stateTestDir, func(t *testing.T, name string, test *StateTest) { |
| 45 | for _, subtest := range test.Subtests() { |
| 46 | subtest := subtest |
| 47 | key := fmt.Sprintf("%s/%d", subtest.Fork, subtest.Index) |
| 48 | name := name + "/" + key |
| 49 | t.Run(key, func(t *testing.T) { |
| 50 | if subtest.Fork == "Constantinople" { |
| 51 | t.Skip("constantinople not supported yet") |
| 52 | } |
| 53 | withTrace(t, test.gasLimit(subtest), func(vmconfig vm.Config) error { |
| 54 | _, err := test.Run(subtest, vmconfig) |
| 55 | return st.checkFailure(t, name, err) |
| 56 | }) |
| 57 | }) |
| 58 | } |
| 59 | }) |
| 60 | } |
| 61 | |
| 62 | // Transactions with gasLimit above this value will not get a VM trace on failure. |
| 63 | const traceErrorLimit = 400000 |
nothing calls this directly
no test coverage detected