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
94b0ce84
Commit
94b0ce84
authored
Nov 05, 2014
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup big_test.go
parent
e76c58d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
big_test.go
ethutil/big_test.go
+15
-5
No files found.
ethutil/big_test.go
View file @
94b0ce84
package
ethutil
import
(
"
fmt
"
"
bytes
"
"testing"
)
...
...
@@ -9,9 +9,11 @@ func TestMisc(t *testing.T) {
a
:=
Big
(
"10"
)
b
:=
Big
(
"57896044618658097711785492504343953926634992332820282019728792003956564819968"
)
c
:=
[]
byte
{
1
,
2
,
3
,
4
}
fmt
.
Println
(
b
)
z
:=
BitTest
(
a
,
1
)
fmt
.
Println
(
z
)
if
z
!=
true
{
t
.
Error
(
"Expected true got"
,
z
)
}
U256
(
a
)
S256
(
a
)
...
...
@@ -57,7 +59,15 @@ func TestBigCopy(t *testing.T) {
b
:=
BigCopy
(
a
)
c
:=
Big
(
"1000000000000"
)
y
:=
BigToBytes
(
b
,
16
)
ybytes
:=
[]
byte
{
0
,
10
}
z
:=
BigToBytes
(
c
,
16
)
fmt
.
Println
(
y
)
fmt
.
Println
(
z
)
zbytes
:=
[]
byte
{
232
,
212
,
165
,
16
,
0
}
if
bytes
.
Compare
(
y
,
ybytes
)
!=
0
{
t
.
Error
(
"Got"
,
ybytes
)
}
if
bytes
.
Compare
(
z
,
zbytes
)
!=
0
{
t
.
Error
(
"Got"
,
zbytes
)
}
}
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