package org.apache.harmony.luni.tests.java.net;
+import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
method = "equals",
args = {java.lang.Object.class}
)
+ @KnownFailure("127.0.0 is not recognized as a valid IP address. " +
+ "Unfortunately, despite the fact that these IP address formats " +
+ "have been the cause of numerous phishing and security " +
+ "vulnerabilities in the past, and most other languages refuse " +
+ "them, the RI documentation explicitly specifies that they are " +
+ "supported. Fix the code to support these.")
public void test_equals() throws Exception {
InetAddress addr = Inet4Address.getByName("239.191.255.255");
assertTrue(addr.equals(addr));
method = "getHostAddress",
args = {}
)
+ @KnownFailure("1, 1.1 and 1.1.1 are not recognized as valid IP addresses.")
public void test_getHostAddress() throws Exception {
InetAddress addr = Inet4Address.getByName("localhost");
assertEquals("127.0.0.1", addr.getHostAddress());
method = "hashCode",
args = {}
)
+ @KnownFailure("1.1 and 1.1.1 are not recognized as valid IP addresses.")
public void test_hashCode() throws Exception {
InetAddress addr1 = Inet4Address.getByName("1.1");
InetAddress addr2 = Inet4Address.getByName("1.1.1");
package org.apache.harmony.luni.tests.java.net;
+import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
method = "equals",
args = {java.lang.Object.class}
)
+ @KnownFailure("127.0.0 is not recognized as a valid IP address. " +
+ "Unfortunately, despite the fact that these IP address formats " +
+ "have been the cause of numerous phishing and security " +
+ "vulnerabilities in the past, and most other languages refuse " +
+ "them, the RI documentation explicitly specifies that they are " +
+ "supported. Fix the code to support these.")
public void test_equals() throws Exception {
InetAddress addr = Inet6Address.getByName("239.191.255.255");
assertTrue(addr.equals(addr));
method = "getHostAddress",
args = {}
)
+ @KnownFailure("1, 1.1 and 1.1.1 are not recognized as valid IP addresses.")
public void test_getHostAddress() throws Exception {
InetAddress aAddr = Inet6Address.getByName("localhost");
assertEquals("127.0.0.1", aAddr.getHostAddress());
method = "hashCode",
args = {}
)
+ @KnownFailure("1.1 and 1.1.1 are not recognized as valid IP addresses.")
public void test_hashCode() throws Exception {
InetAddress addr1 = Inet6Address.getByName("1.1");
InetAddress addr2 = Inet6Address.getByName("1.1.1");
package org.apache.harmony.luni.tests.java.net;
import dalvik.annotation.BrokenTest;
+import dalvik.annotation.KnownFailure;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
method = "getByName",
args = {java.lang.String.class}
)
- @BrokenTest("1.2.3 and 1.2 are not valid IP addresses and throw " +
- "exceptions. These form of IP address has been the cause of " +
- "various security vulnerabilities in the past, and all modern " +
- "implementations refuse them. The test should be modified to " +
- "require that they not function.")
+ @KnownFailure("1.2.3 and 1.2 are not recognized as valid IPv4 addresses. " +
+ "Unfortunately, despite the fact that these IP address formats " +
+ "have been the cause of numerous phishing and security " +
+ "vulnerabilities in the past, and most other languages refuse " +
+ "them, the RI documentation explicitly specifies that they are " +
+ "supported. Fix the code to support these.")
public void test_getByNameLjava_lang_String() throws Exception {
// Test for method java.net.InetAddress
// java.net.InetAddress.getByName(java.lang.String)