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
38034c30
Commit
38034c30
authored
Oct 29, 2014
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ethwire: fix ClientIdentity test
parent
56014844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
client_identity_test.go
ethwire/client_identity_test.go
+6
-6
No files found.
ethwire/client_identity_test.go
View file @
38034c30
...
...
@@ -9,22 +9,22 @@ import (
func
TestClientIdentity
(
t
*
testing
.
T
)
{
clientIdentity
:=
NewSimpleClientIdentity
(
"Ethereum(G)"
,
"0.5.16"
,
"test"
)
clientString
:=
clientIdentity
.
String
()
expected
:=
fmt
.
Sprintf
(
"Ethereum(G)/v0.5.16/test/%s/
Go"
,
runtime
.
GOOS
)
expected
:=
fmt
.
Sprintf
(
"Ethereum(G)/v0.5.16/test/%s/
%s"
,
runtime
.
GOOS
,
runtime
.
Version
()
)
if
clientString
!=
expected
{
t
.
Error
(
"Expected clientIdentity to be %v, got %v
"
,
expected
,
clientString
)
t
.
Error
f
(
"Expected clientIdentity to be %q, got %q
"
,
expected
,
clientString
)
}
customIdentifier
:=
clientIdentity
.
GetCustomIdentifier
()
if
customIdentifier
!=
"test"
{
t
.
Error
(
"Expected clientIdentity.GetCustomIdentifier() to be 'test', got %v
"
,
customIdentifier
)
t
.
Error
f
(
"Expected clientIdentity.GetCustomIdentifier() to be 'test', got %q
"
,
customIdentifier
)
}
clientIdentity
.
SetCustomIdentifier
(
"test2"
)
customIdentifier
=
clientIdentity
.
GetCustomIdentifier
()
if
customIdentifier
!=
"test2"
{
t
.
Error
(
"Expected clientIdentity.GetCustomIdentifier() to be 'test2', got %v
"
,
customIdentifier
)
t
.
Error
f
(
"Expected clientIdentity.GetCustomIdentifier() to be 'test2', got %q
"
,
customIdentifier
)
}
clientString
=
clientIdentity
.
String
()
expected
=
fmt
.
Sprintf
(
"Ethereum(G)/v0.5.16/test2/%s/
Go"
,
runtime
.
GOOS
)
expected
=
fmt
.
Sprintf
(
"Ethereum(G)/v0.5.16/test2/%s/
%s"
,
runtime
.
GOOS
,
runtime
.
Version
()
)
if
clientString
!=
expected
{
t
.
Error
(
"Expected clientIdentity to be %v, got %v
"
,
expected
,
clientString
)
t
.
Error
f
(
"Expected clientIdentity to be %q, got %q
"
,
expected
,
clientString
)
}
}
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