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
01ddaf56
Commit
01ddaf56
authored
May 22, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1072 from Gustav-Simonsson/add_random_tests
Add StateTests/RandomTests and VMTests/RandomTests
parents
f5e112ae
6ad817e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
gh_test.go
tests/vm/gh_test.go
+10
-16
No files found.
tests/vm/gh_test.go
View file @
01ddaf56
...
...
@@ -2,7 +2,6 @@ package vm
import
(
"bytes"
"io/ioutil"
"math/big"
"os"
"path/filepath"
...
...
@@ -373,21 +372,16 @@ func TestWallet(t *testing.T) {
RunVmTest
(
fn
,
t
)
}
func
TestRandom
(
t
*
testing
.
T
)
{
// TODO: fix JSON EOF bug and unskip
t
.
Skip
()
fileNames
:=
make
([]
string
,
1024
)
fileInfos
,
err
:=
ioutil
.
ReadDir
(
"../files/StateTests/RandomTests"
)
if
err
!=
nil
{
t
.
Errorf
(
"Could not read StateTests/RandomTests dir: %v"
,
err
)
return
}
for
_
,
fileInfo
:=
range
fileInfos
{
fileNames
=
append
(
fileNames
,
fileInfo
.
Name
())
func
TestStateTestsRandom
(
t
*
testing
.
T
)
{
fns
,
_
:=
filepath
.
Glob
(
"../files/StateTests/RandomTests/*"
)
for
_
,
fn
:=
range
fns
{
RunVmTest
(
fn
,
t
)
}
}
//for _, f := range fileNames {
path
:=
filepath
.
Join
(
"../files/StateTests/RandomTests/"
,
fileNames
[
0
])
RunVmTest
(
path
,
t
)
//}
func
TestVMRandom
(
t
*
testing
.
T
)
{
fns
,
_
:=
filepath
.
Glob
(
"../files/VMTests/RandomTests/*"
)
for
_
,
fn
:=
range
fns
{
RunVmTest
(
fn
,
t
)
}
}
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