Skip to content

Commit

Permalink
better to create a separate test for the failing scenarion
Browse files Browse the repository at this point in the history
  • Loading branch information
cshtdd committed Jan 16, 2019
1 parent 4e71f6f commit 2a8913f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ public void testToAddrStringIPv6() {
assertEquals("::1",
InetAddresses.toAddrString(
InetAddresses.forString("::1")));
assertEquals("::1",
InetAddresses.toAddrString(
InetAddresses.forString("::1%0")));
assertEquals("2001:658:22a:cafe::",
InetAddresses.toAddrString(
InetAddresses.forString("2001:0658:022a:cafe::")));
Expand All @@ -212,6 +209,12 @@ public void testToAddrStringIPv6() {
InetAddresses.forString("::1.2.3.4")));
}

public void testToAddrStringIPv6WithZoneId(){
assertEquals("::1",
InetAddresses.toAddrString(
InetAddresses.forString("::1%0")));
}

public void testToUriStringIPv4() {
String ipStr = "1.2.3.4";
InetAddress ip = InetAddresses.forString(ipStr);
Expand Down

0 comments on commit 2a8913f

Please sign in to comment.