diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-28 14:01:15 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-28 14:01:15 -0700 |
commit | 6f964dfa7c9a6aaa15669bdafbb0ffc4d7cae588 (patch) | |
tree | 04a8cbd4ac2cc30cff1606a377390bc09b16a08b | |
parent | 7da31c8e53742833743ae0092c01d925fcab87c3 (diff) | |
parent | 56878de3fe67c7c2af4329ed8ea12f599cca2ead (diff) | |
download | libcore-6f964dfa7c9a6aaa15669bdafbb0ffc4d7cae588.zip libcore-6f964dfa7c9a6aaa15669bdafbb0ffc4d7cae588.tar.gz libcore-6f964dfa7c9a6aaa15669bdafbb0ffc4d7cae588.tar.bz2 |
Merge change 22992 into eclair
* changes:
Annotate tests that are failing due to legacy IP address formats that have not been implemented yet.
3 files changed, 25 insertions, 5 deletions
diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java index 163db31..920f137 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet4AddressTest.java @@ -17,6 +17,7 @@ package org.apache.harmony.luni.tests.java.net; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestTargets; import dalvik.annotation.TestLevel; @@ -483,6 +484,12 @@ public class Inet4AddressTest extends junit.framework.TestCase { 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)); @@ -501,6 +508,7 @@ public class Inet4AddressTest extends junit.framework.TestCase { 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()); @@ -527,6 +535,7 @@ public class Inet4AddressTest extends junit.framework.TestCase { 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"); diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java index 498c486..62952d9 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/Inet6AddressTest.java @@ -17,6 +17,7 @@ package org.apache.harmony.luni.tests.java.net; +import dalvik.annotation.KnownFailure; import dalvik.annotation.TestTargetClass; import dalvik.annotation.TestLevel; import dalvik.annotation.TestTargetNew; @@ -1152,6 +1153,12 @@ public class Inet6AddressTest extends junit.framework.TestCase { 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)); @@ -1170,6 +1177,7 @@ public class Inet6AddressTest extends junit.framework.TestCase { 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()); @@ -1230,6 +1238,7 @@ public class Inet6AddressTest extends junit.framework.TestCase { 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"); diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java index a1c5f4f..5c8808c 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java @@ -18,6 +18,7 @@ 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; @@ -254,11 +255,12 @@ public class InetAddressTest extends junit.framework.TestCase { 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) |