good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
bbcf304b
Commit
bbcf304b
authored
Feb 18, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Plain Diff
Merge pull request #3 from josephyzhou/develop
Migrated to here
parents
c866fcc5
c5b009ba
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ethutil/config.go
+1
-1
1 addition, 1 deletion
ethutil/config.go
ethutil/encoding_test.go
+30
-0
30 additions, 0 deletions
ethutil/encoding_test.go
with
31 additions
and
1 deletion
ethutil/config.go
+
1
−
1
View file @
bbcf304b
...
@@ -38,7 +38,7 @@ func ReadConfig(base string) *config {
...
@@ -38,7 +38,7 @@ func ReadConfig(base string) *config {
_
,
err
:=
os
.
Stat
(
path
)
_
,
err
:=
os
.
Stat
(
path
)
if
err
!=
nil
{
if
err
!=
nil
{
if
os
.
IsNotExist
(
err
)
{
if
os
.
IsNotExist
(
err
)
{
log
.
Printf
(
"Debug logging directory %s doesn't exist, creating it"
,
path
)
log
.
Printf
(
"Debug logging directory %s doesn't exist, creating it
\n
"
,
path
)
os
.
Mkdir
(
path
,
0777
)
os
.
Mkdir
(
path
,
0777
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
ethutil/encoding_test.go
+
30
−
0
View file @
bbcf304b
...
@@ -35,3 +35,33 @@ func TestCompactHexDecode(t *testing.T) {
...
@@ -35,3 +35,33 @@ func TestCompactHexDecode(t *testing.T) {
t
.
Error
(
"Error compact hex decode. Expected"
,
exp
,
"got"
,
res
)
t
.
Error
(
"Error compact hex decode. Expected"
,
exp
,
"got"
,
res
)
}
}
}
}
func
TestCompactDecode
(
t
*
testing
.
T
)
{
exp
:=
[]
int
{
1
,
2
,
3
,
4
,
5
}
res
:=
CompactDecode
(
"
\x11\x23\x45
"
)
if
!
CompareIntSlice
(
res
,
exp
)
{
t
.
Error
(
"odd compact decode. Expected"
,
exp
,
"got"
,
res
)
}
exp
=
[]
int
{
0
,
1
,
2
,
3
,
4
,
5
}
res
=
CompactDecode
(
"
\x00\x01\x23\x45
"
)
if
!
CompareIntSlice
(
res
,
exp
)
{
t
.
Error
(
"even compact decode. Expected"
,
exp
,
"got"
,
res
)
}
exp
=
[]
int
{
0
,
15
,
1
,
12
,
11
,
8
/*term*/
,
16
}
res
=
CompactDecode
(
"
\x20\x0f\x1c\xb8
"
)
if
!
CompareIntSlice
(
res
,
exp
)
{
t
.
Error
(
"even terminated compact decode. Expected"
,
exp
,
"got"
,
res
)
}
exp
=
[]
int
{
15
,
1
,
12
,
11
,
8
/*term*/
,
16
}
res
=
CompactDecode
(
"
\x3f\x1c\xb8
"
)
if
!
CompareIntSlice
(
res
,
exp
)
{
t
.
Error
(
"even terminated compact decode. Expected"
,
exp
,
"got"
,
res
)
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment