hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1443277 - /httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java
Date Wed, 06 Feb 2013 23:53:45 GMT
Author: sebb
Date: Wed Feb  6 23:53:45 2013
New Revision: 1443277

URL: http://svn.apache.org/viewvc?rev=1443277&view=rev
Log:
Add some more test examples

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=1443277&r1=1443276&r2=1443277&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
Wed Feb  6 23:53:45 2013
@@ -57,12 +57,15 @@ public class TestInetAddressUtils {
         Assert.assertTrue(InetAddressUtils.isIPv6HexCompressedAddress("2001:0db8:0:0::1428:57ab"));
         Assert.assertTrue(InetAddressUtils.isIPv6HexCompressedAddress("2001:0db8::1428:57ab"));
         Assert.assertTrue(InetAddressUtils.isIPv6HexCompressedAddress("2001:db8::1428:57ab"));
+        Assert.assertTrue(InetAddressUtils.isIPv6HexCompressedAddress("::1"));
     }
 
     @Test
     public void testInvalidIPv6Address() {
         Assert.assertFalse(InetAddressUtils.isIPv6Address("2001:0db8:0000:garb:age0:0000:1428:57ab"));
         Assert.assertFalse(InetAddressUtils.isIPv6Address("2001:0gb8:0000:0000:0000:0000:1428:57ab"));
+        Assert.assertFalse(InetAddressUtils.isIPv6HexCompressedAddress(":1"));
+        Assert.assertFalse(InetAddressUtils.isIPv6Address("2001:0db8::0000::57ab")); // Cannot
have two contractions
     }
 
 }



Mime
View raw message