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
p2p
go-cidranger
Commits
7ab5731c
Commit
7ab5731c
authored
Aug 30, 2017
by
Yulin Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move error assertion outside of for loop
parent
003cc812
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
cidranger_test.go
cidranger_test.go
+2
-2
No files found.
cidranger_test.go
View file @
7ab5731c
...
...
@@ -48,8 +48,8 @@ func testContainsAgainstBase(t *testing.T, iterations int, ipGen ipGenerator) {
for
i
:=
0
;
i
<
iterations
;
i
++
{
nn
:=
ipGen
()
expected
,
err
:=
baseRanger
.
Contains
(
nn
.
ToIP
())
assert
.
NoError
(
t
,
err
)
for
_
,
ranger
:=
range
rangers
{
assert
.
NoError
(
t
,
err
)
actual
,
err
:=
ranger
.
Contains
(
nn
.
ToIP
())
assert
.
NoError
(
t
,
err
)
assert
.
Equal
(
t
,
expected
,
actual
)
...
...
@@ -68,8 +68,8 @@ func testContainingNetworksAgainstBase(t *testing.T, iterations int, ipGen ipGen
for
i
:=
0
;
i
<
iterations
;
i
++
{
nn
:=
ipGen
()
expected
,
err
:=
baseRanger
.
ContainingNetworks
(
nn
.
ToIP
())
assert
.
NoError
(
t
,
err
)
for
_
,
ranger
:=
range
rangers
{
assert
.
NoError
(
t
,
err
)
actual
,
err
:=
ranger
.
ContainingNetworks
(
nn
.
ToIP
())
assert
.
NoError
(
t
,
err
)
assert
.
Equal
(
t
,
len
(
expected
),
len
(
actual
))
...
...
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