From cbb0c48021ab15b31cea59d88dd3664c29a3337a Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Wed, 6 Feb 2013 23:53:45 +0000 Subject: [PATCH] Add some more test examples git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1443277 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/http/conn/util/TestInetAddressUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java b/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java index 4a1231e60..38cf39bf0 100644 --- a/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java +++ b/httpclient/src/test/java/org/apache/http/conn/util/TestInetAddressUtils.java @@ -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 } }