hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1445023 - /httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java
Date Tue, 12 Feb 2013 03:09:31 GMT
Author: sebb
Date: Tue Feb 12 03:09:30 2013
New Revision: 1445023

URL: http://svn.apache.org/r1445023
Log:
Add tests to show compressed IPv6 addresses cannot have too many leading or trailing fields

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java?rev=1445023&r1=1445022&r2=1445023&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java
Tue Feb 12 03:09:30 2013
@@ -69,6 +69,8 @@ public class TestInetAddressUtils {
         Assert.assertFalse(InetAddressUtils.isIPv6StdAddress("0:0:0:0:0:0:0")); // Too few
         Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress(":1"));
         Assert.assertFalse(InetAddressUtils.isIPv6Address("2001:0db8::0000::57ab")); // Cannot
have two contractions
+        Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress("1:2:3:4:5:6:7::9"));
// too many fields before ::
+        Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress("::3:4:5:6:7:8:9"));
// too many fields after ::
     }
 
     @Test



Mime
View raw message