Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitbourahlavignal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIGNAL Nicolas
gitbourahlavignal
Commits
5a089bda
Commit
5a089bda
authored
8 years ago
by
Michael Miller
Committed by
Romain Tartière
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for unique_local?
parent
f131450c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/ipaddress/ipv6_test.rb
+25
-0
25 additions, 0 deletions
test/ipaddress/ipv6_test.rb
with
25 additions
and
0 deletions
test/ipaddress/ipv6_test.rb
+
25
−
0
View file @
5a089bda
...
@@ -58,6 +58,22 @@ class IPv6Test < Minitest::Test
...
@@ -58,6 +58,22 @@ class IPv6Test < Minitest::Test
"ff80:03:02:01::"
,
"ff80:03:02:01::"
,
"2001:db8::8:800:200c:417a"
,
"2001:db8::8:800:200c:417a"
,
"fe80::/63"
]
"fe80::/63"
]
@unique_local
=
[
"fc00::/7"
,
"fc00::/8"
,
"fd00::/8"
,
"fd12:3456:789a:1::1"
,
"fd12:3456:789a:1::/64"
,
"fc00::1"
]
@not_unique_local
=
[
"fc00::/6"
,
"::"
,
"::1"
,
"fe80::"
,
"fe80::1"
,
"fe80::/64"
]
end
end
...
@@ -240,6 +256,15 @@ class IPv6Test < Minitest::Test
...
@@ -240,6 +256,15 @@ class IPv6Test < Minitest::Test
end
end
end
end
def
test_method_unique_local?
@unique_local
.
each
do
|
addr
|
assert_equal
true
,
@klass
.
new
(
addr
).
unique_local?
end
@not_unique_local
.
each
do
|
addr
|
assert_equal
false
,
@klass
.
new
(
addr
).
unique_local?
end
end
def
test_method_network
def
test_method_network
@networks
.
each
do
|
addr
,
net
|
@networks
.
each
do
|
addr
,
net
|
ip
=
@klass
.
new
addr
ip
=
@klass
.
new
addr
...
...
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