@@ -53,33 +53,25 @@ func TestState(t *testing.T) {
5353 //st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
5454 //st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")
5555
56- st .walk (t , stateTestDir , func (t * testing.T , name string , test * StateTest ) {
57- for _ , subtest := range test .Subtests () {
58- subtest := subtest
59- key := fmt .Sprintf ("%s/%d" , subtest .Fork , subtest .Index )
60- name := name + "/" + key
61- t .Run (key , func (t * testing.T ) {
62- withTrace (t , test .gasLimit (subtest ), func (vmconfig vm.Config ) error {
63- _ , err := test .Run (subtest , vmconfig )
64- return st .checkFailure (t , name , err )
65- })
66- })
67- }
68- })
6956 // For Istanbul, older tests were moved into LegacyTests
70- st .walk (t , legacyStateTestDir , func (t * testing.T , name string , test * StateTest ) {
71- for _ , subtest := range test .Subtests () {
72- subtest := subtest
73- key := fmt .Sprintf ("%s/%d" , subtest .Fork , subtest .Index )
74- name := name + "/" + key
75- t .Run (key , func (t * testing.T ) {
76- withTrace (t , test .gasLimit (subtest ), func (vmconfig vm.Config ) error {
77- _ , err := test .Run (subtest , vmconfig )
78- return st .checkFailure (t , name , err )
57+ for _ , dir := range []string {
58+ stateTestDir ,
59+ legacyStateTestDir ,
60+ } {
61+ st .walk (t , dir , func (t * testing.T , name string , test * StateTest ) {
62+ for _ , subtest := range test .Subtests () {
63+ subtest := subtest
64+ key := fmt .Sprintf ("%s/%d" , subtest .Fork , subtest .Index )
65+ name := name + "/" + key
66+ t .Run (key , func (t * testing.T ) {
67+ withTrace (t , test .gasLimit (subtest ), func (vmconfig vm.Config ) error {
68+ _ , err := test .Run (subtest , vmconfig )
69+ return st .checkFailure (t , name , err )
70+ })
7971 })
80- })
81- }
82- })
72+ }
73+ })
74+ }
8375}
8476
8577// Transactions with gasLimit above this value will not get a VM trace on failure.
0 commit comments