Package freenet.io

Examples of freenet.io.Inet6AddressMatcher.matches()


*/
public class Inet6AddressMatcherTest extends TestCase {

  public void test() throws Exception {
    Inet6AddressMatcher matcher = new Inet6AddressMatcher("0:0:0:0:0:0:0:0/0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
View Full Code Here


  public void test() throws Exception {
    Inet6AddressMatcher matcher = new Inet6AddressMatcher("0:0:0:0:0:0:0:0/0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));
View Full Code Here

    Inet6AddressMatcher matcher = new Inet6AddressMatcher("0:0:0:0:0:0:0:0/0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));
View Full Code Here

    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
View Full Code Here

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
View Full Code Here

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/64");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
View Full Code Here

    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
View Full Code Here

    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));
View Full Code Here

    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));
View Full Code Here

    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/ffff:ffff:ffff:ffff:0:0:0:0");
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:203:dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0204:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("fe81:0:0:0:0203:0dff:fe22:420f")));
    assertEquals(false, matcher.matches(InetAddress.getByName("0:0:0:0:0:0:0:1")));
    assertEquals(true, matcher.matches(InetAddress.getByName("fe80:0:0:0:0:0:0:1")));

    matcher = new Inet6AddressMatcher("fe80:0:0:0:203:dff:fe22:420f/128");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.