Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c5b46a79
Unverified
Commit
c5b46a79
authored
Nov 20, 2019
by
Péter Szilágyi
Committed by
GitHub
Nov 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #20338 from etclabscore/feat/statetests-dedupe-walk-refactor
tests: refactor TestState to dedupe walk callback
parents
b4bc3b3c
b8ced9e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
25 deletions
+17
-25
state_test.go
tests/state_test.go
+17
-25
No files found.
tests/state_test.go
View file @
c5b46a79
...
@@ -53,33 +53,25 @@ func TestState(t *testing.T) {
...
@@ -53,33 +53,25 @@ func TestState(t *testing.T) {
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/0`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")
//st.fails(`^stRevertTest/RevertPrecompiledTouch(_storage)?\.json/ConstantinopleFix/3`, "bug in test")
st
.
walk
(
t
,
stateTestDir
,
func
(
t
*
testing
.
T
,
name
string
,
test
*
StateTest
)
{
for
_
,
subtest
:=
range
test
.
Subtests
()
{
subtest
:=
subtest
key
:=
fmt
.
Sprintf
(
"%s/%d"
,
subtest
.
Fork
,
subtest
.
Index
)
name
:=
name
+
"/"
+
key
t
.
Run
(
key
,
func
(
t
*
testing
.
T
)
{
withTrace
(
t
,
test
.
gasLimit
(
subtest
),
func
(
vmconfig
vm
.
Config
)
error
{
_
,
err
:=
test
.
Run
(
subtest
,
vmconfig
)
return
st
.
checkFailure
(
t
,
name
,
err
)
})
})
}
})
// For Istanbul, older tests were moved into LegacyTests
// For Istanbul, older tests were moved into LegacyTests
st
.
walk
(
t
,
legacyStateTestDir
,
func
(
t
*
testing
.
T
,
name
string
,
test
*
StateTest
)
{
for
_
,
dir
:=
range
[]
string
{
for
_
,
subtest
:=
range
test
.
Subtests
()
{
stateTestDir
,
subtest
:=
subtest
legacyStateTestDir
,
key
:=
fmt
.
Sprintf
(
"%s/%d"
,
subtest
.
Fork
,
subtest
.
Index
)
}
{
name
:=
name
+
"/"
+
key
st
.
walk
(
t
,
dir
,
func
(
t
*
testing
.
T
,
name
string
,
test
*
StateTest
)
{
t
.
Run
(
key
,
func
(
t
*
testing
.
T
)
{
for
_
,
subtest
:=
range
test
.
Subtests
()
{
withTrace
(
t
,
test
.
gasLimit
(
subtest
),
func
(
vmconfig
vm
.
Config
)
error
{
subtest
:=
subtest
_
,
err
:=
test
.
Run
(
subtest
,
vmconfig
)
key
:=
fmt
.
Sprintf
(
"%s/%d"
,
subtest
.
Fork
,
subtest
.
Index
)
return
st
.
checkFailure
(
t
,
name
,
err
)
name
:=
name
+
"/"
+
key
t
.
Run
(
key
,
func
(
t
*
testing
.
T
)
{
withTrace
(
t
,
test
.
gasLimit
(
subtest
),
func
(
vmconfig
vm
.
Config
)
error
{
_
,
err
:=
test
.
Run
(
subtest
,
vmconfig
)
return
st
.
checkFailure
(
t
,
name
,
err
)
})
})
})
}
)
}
}
}
)
}
)
}
}
}
// Transactions with gasLimit above this value will not get a VM trace on failure.
// Transactions with gasLimit above this value will not get a VM trace on failure.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment