Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mf
go-multiaddr
Commits
5734f44c
Commit
5734f44c
authored
May 04, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go vet
parent
ad12fa30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
multiaddr_test.go
multiaddr_test.go
+5
-5
No files found.
multiaddr_test.go
View file @
5734f44c
...
@@ -257,7 +257,7 @@ func TestProtocolsWithString(t *testing.T) {
...
@@ -257,7 +257,7 @@ func TestProtocolsWithString(t *testing.T) {
for
s
,
ps1
:=
range
good
{
for
s
,
ps1
:=
range
good
{
ps2
,
err
:=
ProtocolsWithString
(
s
)
ps2
,
err
:=
ProtocolsWithString
(
s
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Error
(
"ProtocolsWithString(%s) should have succeeded"
,
s
)
t
.
Error
f
(
"ProtocolsWithString(%s) should have succeeded"
,
s
)
}
}
for
i
,
ps1p
:=
range
ps1
{
for
i
,
ps1p
:=
range
ps1
{
...
@@ -277,7 +277,7 @@ func TestProtocolsWithString(t *testing.T) {
...
@@ -277,7 +277,7 @@ func TestProtocolsWithString(t *testing.T) {
for
_
,
s
:=
range
bad
{
for
_
,
s
:=
range
bad
{
if
_
,
err
:=
ProtocolsWithString
(
s
);
err
==
nil
{
if
_
,
err
:=
ProtocolsWithString
(
s
);
err
==
nil
{
t
.
Error
(
"ProtocolsWithString(%s) should have failed"
,
s
)
t
.
Error
f
(
"ProtocolsWithString(%s) should have failed"
,
s
)
}
}
}
}
...
@@ -320,7 +320,7 @@ func assertValueForProto(t *testing.T, a Multiaddr, p int, exp string) {
...
@@ -320,7 +320,7 @@ func assertValueForProto(t *testing.T, a Multiaddr, p int, exp string) {
}
}
if
fv
!=
exp
{
if
fv
!=
exp
{
t
.
Fatalf
(
"expected %q for %d in %
d
, but got %q instead"
,
exp
,
p
,
a
,
fv
)
t
.
Fatalf
(
"expected %q for %d in %
s
, but got %q instead"
,
exp
,
p
,
a
,
fv
)
}
}
}
}
...
@@ -366,7 +366,7 @@ func TestFuzzBytes(t *testing.T) {
...
@@ -366,7 +366,7 @@ func TestFuzzBytes(t *testing.T) {
ma
,
err
:=
NewMultiaddrBytes
(
buf
[
:
l
])
ma
,
err
:=
NewMultiaddrBytes
(
buf
[
:
l
])
if
err
==
nil
{
if
err
==
nil
{
// for any valid multiaddrs, make sure these calls don't panic
// for any valid multiaddrs, make sure these calls don't panic
ma
.
String
()
_
=
ma
.
String
()
ma
.
Protocols
()
ma
.
Protocols
()
}
}
}
}
...
@@ -400,7 +400,7 @@ func TestFuzzString(t *testing.T) {
...
@@ -400,7 +400,7 @@ func TestFuzzString(t *testing.T) {
ma
,
err
:=
NewMultiaddr
(
randMaddrString
())
ma
,
err
:=
NewMultiaddr
(
randMaddrString
())
if
err
==
nil
{
if
err
==
nil
{
// for any valid multiaddrs, make sure these calls don't panic
// for any valid multiaddrs, make sure these calls don't panic
ma
.
String
()
_
=
ma
.
String
()
ma
.
Protocols
()
ma
.
Protocols
()
}
}
}
}
...
...
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