[java-support] branch master updated: Add a V6 range checking test.
Scott Cantor
cantor.2 at osu.edu
Tue Jan 12 16:23:02 EST 2016
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-support.
The following commit(s) were added to refs/heads/master by this push:
new 485d5bf Add a V6 range checking test.
485d5bf is described below
commit 485d5bfad3e40ae774e4f0de3811f9c03e37e422
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Jan 12 16:25:12 2016 -0500
Add a V6 range checking test.
---
.../net/shibboleth/utilities/java/support/net/IPRangeTest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/test/java/net/shibboleth/utilities/java/support/net/IPRangeTest.java b/src/test/java/net/shibboleth/utilities/java/support/net/IPRangeTest.java
index 68868c9..ab269f5 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/net/IPRangeTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/net/IPRangeTest.java
@@ -66,7 +66,7 @@ public class IPRangeTest {
// IPRange given a host address
IPRange hostRange = IPRange.parseCIDRBlock("192.168.117.199/28");
-
+
// test for contain
byte[] bytes = new byte[] {(byte) 192, (byte) 168, 117, (byte) 191};
Assert.assertFalse(networkRange.contains(bytes));
@@ -87,6 +87,11 @@ public class IPRangeTest {
Assert.assertFalse(networkRange.contains(InetAddress.getLocalHost()));
Assert.assertFalse(hostRange.contains(InetAddress.getLocalHost()));
+
+ // IPRange for V6
+ IPRange v6Range = IPRange.parseCIDRBlock("2620:102:c000::1/48");
+ InetAddress v6Addr = InetAddress.getByName("2620:102:c000:f10:d::29c1");
+ Assert.assertTrue(v6Range.contains(v6Addr));
}
@Test public void testGetNetworkAddress() {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list