IPMatcher: Add test to verify parsing of netmask

This commit is contained in:
Alexander Sulfrian
2019-04-01 18:49:27 +02:00
parent d8ca94d304
commit 8b1a75d309

View File

@@ -153,6 +153,14 @@ public class IPMatcherTest {
assertFalse(ipMatcher.match("0:0:0:0:0:0:0:1"));
}
@Test
public void testIPv6FullMaskMatching() throws Exception {
final IPMatcher ipMatcher = new IPMatcher("::2/128");
assertTrue(ipMatcher.match("0:0:0:0:0:0:0:2"));
assertFalse(ipMatcher.match("0:0:0:0:0:0:0:1"));
}
@Test
public void testAsteriskMatchingSuccess() throws Exception {