Merge the only useful difference from the libcore duplicate.
Change-Id: I7a1f1d90622c31ced086bce2c40d0d644d2772af
diff --git a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java
index f244be0..6b766d9 100644
--- a/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java
+++ b/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java
@@ -54,20 +54,11 @@
}
- /**
- * @tests java.net.Inet4Address#isAnyLocalAddress()
- */
- public void test_isAnyLocalAddress() throws Exception {
- String addrName = "";
- addrName = "0.0.0.0";
- InetAddress addr = InetAddress.getByName(addrName);
- assertTrue("ANY address " + addrName + " not detected.", addr
- .isAnyLocalAddress());
- }
+ public void test_isAnyLocalAddress() throws Exception {
+ assertTrue(InetAddress.getByName("0.0.0.0").isAnyLocalAddress());
+ assertFalse(InetAddress.getByName("127.0.0.1").isAnyLocalAddress());
+ }
- /**
- * @tests java.net.Inet4Address#isLoopbackAddress()
- */
public void test_isLoopbackAddress() throws Exception {
// Create some IP V4 addresses and test if they are local...
@@ -316,7 +307,7 @@
+ " not identified as a org-local multicast address.", addr
.isMCOrgLocal());
}
-
+
// comparator for Inet4Address objects
private static final SerializableAssert COMPARATOR = new SerializableAssert() {
public void assertDeserialized(Serializable initial,