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
a4dc12f1
Commit
a4dc12f1
authored
Dec 31, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional comments and added name to error output
parent
4547a05a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
gh_test.go
tests/vm/gh_test.go
+3
-5
No files found.
tests/vm/gh_test.go
View file @
a4dc12f1
...
@@ -108,17 +108,16 @@ func RunVmTest(p string, t *testing.T) {
...
@@ -108,17 +108,16 @@ func RunVmTest(p string, t *testing.T) {
)
)
isVmTest
:=
len
(
test
.
Exec
)
>
0
isVmTest
:=
len
(
test
.
Exec
)
>
0
if
isVmTest
{
if
isVmTest
{
ret
,
logs
,
gas
,
err
=
helper
.
RunVm
(
statedb
,
env
,
test
.
Exec
)
ret
,
logs
,
gas
,
err
=
helper
.
RunVm
(
statedb
,
env
,
test
.
Exec
)
}
else
{
}
else
{
ret
,
logs
,
gas
,
err
=
helper
.
RunState
(
statedb
,
env
,
test
.
Transaction
)
ret
,
logs
,
gas
,
err
=
helper
.
RunState
(
statedb
,
env
,
test
.
Transaction
)
}
}
//
When an error is returned it doesn't always mean the tests fails
.
//
Log the error if there is one. Error does not mean failing test
.
//
Have to come up with some conditional failing mechanism
.
//
A test fails if err != nil and post params are specified in the test
.
if
err
!=
nil
{
if
err
!=
nil
{
helper
.
Log
.
Info
ln
(
err
)
helper
.
Log
.
Info
f
(
"%s's: %v
\n
"
,
name
,
err
)
}
}
rexp
:=
helper
.
FromHex
(
test
.
Out
)
rexp
:=
helper
.
FromHex
(
test
.
Out
)
...
@@ -160,7 +159,6 @@ func RunVmTest(p string, t *testing.T) {
...
@@ -160,7 +159,6 @@ func RunVmTest(p string, t *testing.T) {
}
}
if
len
(
test
.
Logs
)
>
0
{
if
len
(
test
.
Logs
)
>
0
{
// Logs within the test itself aren't correct, missing empty fields (32 0s)
for
i
,
log
:=
range
test
.
Logs
{
for
i
,
log
:=
range
test
.
Logs
{
genBloom
:=
ethutil
.
LeftPadBytes
(
types
.
LogsBloom
(
state
.
Logs
{
logs
[
i
]})
.
Bytes
(),
64
)
genBloom
:=
ethutil
.
LeftPadBytes
(
types
.
LogsBloom
(
state
.
Logs
{
logs
[
i
]})
.
Bytes
(),
64
)
if
!
bytes
.
Equal
(
genBloom
,
ethutil
.
Hex2Bytes
(
log
.
BloomF
))
{
if
!
bytes
.
Equal
(
genBloom
,
ethutil
.
Hex2Bytes
(
log
.
BloomF
))
{
...
...
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