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
4ea93eba
Commit
4ea93eba
authored
Jan 15, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests
parent
44900e36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
dagger_test.go
dagger_test.go
+2
-1
test_runner_test.go
test_runner_test.go
+5
-3
No files found.
dagger_test.go
View file @
4ea93eba
package
main
import
(
"github.com/ethereum/ethutil-go"
"math/big"
"testing"
)
func
BenchmarkDaggerSearch
(
b
*
testing
.
B
)
{
hash
:=
big
.
NewInt
(
0
)
diff
:=
BigPow
(
2
,
36
)
diff
:=
ethutil
.
BigPow
(
2
,
36
)
o
:=
big
.
NewInt
(
0
)
// nonce doesn't matter. We're only testing against speed, not validity
// Reset timer so the big generation isn't included in the benchmark
...
...
test_runner_test.go
View file @
4ea93eba
...
...
@@ -3,6 +3,8 @@ package main
import
(
"encoding/hex"
_
"fmt"
"github.com/ethereum/ethdb-go"
"github.com/ethereum/ethutil-go"
"testing"
)
...
...
@@ -15,8 +17,8 @@ var testsource = `{"Inputs":{
}`
func
TestTestRunner
(
t
*
testing
.
T
)
{
db
,
_
:=
NewMemDatabase
()
trie
:=
NewTrie
(
db
,
""
)
db
,
_
:=
ethdb
.
NewMemDatabase
()
trie
:=
ethutil
.
NewTrie
(
db
,
""
)
runner
:=
NewTestRunner
(
t
)
runner
.
RunFromString
(
testsource
,
func
(
source
*
TestSource
)
{
...
...
@@ -24,7 +26,7 @@ func TestTestRunner(t *testing.T) {
trie
.
Update
(
key
,
value
)
}
if
hex
.
EncodeToString
([]
byte
(
trie
.
r
oot
))
!=
source
.
Expectation
{
if
hex
.
EncodeToString
([]
byte
(
trie
.
R
oot
))
!=
source
.
Expectation
{
t
.
Error
(
"trie root did not match"
)
}
})
...
...
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