summaryrefslogtreecommitdiffstats
path: root/harmony-tests
diff options
context:
space:
mode:
authorBrett Chabot <brettchabot@google.com>2014-02-27 11:46:10 -0800
committerNeil Fuller <nfuller@google.com>2014-05-21 09:31:03 +0100
commit6cc167354969859a27919a8d7f546cb4bd74d51e (patch)
treee333aaff1d8211a2f29b509078db398ddf09152e /harmony-tests
parent6167671bf318661c6d9f9f44d4ad4b14d60e9224 (diff)
downloadlibcore-6cc167354969859a27919a8d7f546cb4bd74d51e.zip
libcore-6cc167354969859a27919a8d7f546cb4bd74d51e.tar.gz
libcore-6cc167354969859a27919a8d7f546cb4bd74d51e.tar.bz2
Deprecate use of BrokenTest and SideEffect
Use expectations files instead. (cherry picked from commit 6a6b612286976cc185c898803fe51e4e062bd9eb) Bug: 12924356 Change-Id: I9b7e71805a80176c873cffe46bed65f81de1903d
Diffstat (limited to 'harmony-tests')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ProcessManagerTest.java4
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java4
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java7
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/X509CertificateTest.java7
4 files changed, 7 insertions, 15 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ProcessManagerTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ProcessManagerTest.java
index 3930b59..9f7474a 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ProcessManagerTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ProcessManagerTest.java
@@ -16,8 +16,6 @@
package org.apache.harmony.tests.java.lang;
-import dalvik.annotation.BrokenTest;
-
import junit.framework.TestCase;
import java.io.BufferedReader;
@@ -47,7 +45,7 @@ public class ProcessManagerTest extends TestCase {
assertEquals(greeting, readLine(process));
}
- @BrokenTest("Sporadic failures in CTS, but not in CoreTestRunner")
+ // BrokenTest: Sporadic failures in CTS, but not in CoreTestRunner
public void testSleep() throws IOException {
String[] commands = { "sleep", "1" };
process = Runtime.getRuntime().exec(commands, null, null);
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
index cfc5d0d..f66cbbf 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.harmony.tests.java.lang.ref;
-import dalvik.annotation.SideEffect;
-
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
@@ -79,7 +77,7 @@ public class SoftReferenceTest extends junit.framework.TestCase {
assertTrue("Same object not returned.", bool == sr.get());
}
- @SideEffect("Causes OutOfMemoryError to test finalization")
+ // SideEffect: Causes OutOfMemoryError to test finalization
public void test_get_SoftReference() {
class TestObject {
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
index 9cd4947..0cad681 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
@@ -1,7 +1,6 @@
package org.apache.harmony.tests.java.lang.reflect;
import dalvik.annotation.AndroidOnly;
-import dalvik.annotation.SideEffect;
import dalvik.system.DexFile;
import junit.framework.TestCase;
@@ -34,9 +33,9 @@ public class GenericSignatureFormatErrorTest extends TestCase{
@AndroidOnly("Uses Android specific class dalvik.system.DexFile " +
"for loading classes.")
- @SideEffect("strange issue (exception: 'could not open dex file', " +
- "dalvikvm: 'waitpid failed' log msg - only occurs when @SideEffect is removed " +
- "and this test is run via running tests.luni.AllTestsLang TestSuite")
+ // SideEffect: strange issue (exception: 'could not open dex file',
+ // dalvikvm: 'waitpid failed' log msg - only occurs when @SideEffect is removed
+ // and this test is run via running tests.luni.AllTestsLang TestSuite
public void test_signatureFormatError() throws Exception {
/*
* dex1.bytes is a jar file with a classes.dex in it.
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/X509CertificateTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
index e937db9..64bfbb3 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
@@ -22,9 +22,6 @@
package tests.api.javax.security.cert;
-import dalvik.annotation.BrokenTest;
-import dalvik.annotation.SideEffect;
-
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
@@ -661,7 +658,7 @@ public class X509CertificateTest extends TestCase {
* @throws CertificateException
* {@link Certificate#verify(PublicKey)}
*/
- @SideEffect("Destroys MD5 provider, hurts succeeding tests")
+ // Side Effect: Destroys MD5 provider, hurts succeeding tests
public void testVerifyPublicKey() throws InvalidKeyException,
NoSuchAlgorithmException, NoSuchProviderException,
SignatureException, CertificateException {
@@ -744,7 +741,7 @@ public class X509CertificateTest extends TestCase {
* @throws CertificateException
* {@link Certificate#verify(PublicKey, String)}
*/
- @SideEffect("Destroys MD5 provider, hurts succeeding tests")
+ // SideEffect: Destroys MD5 provider, hurts succeeding tests
public void testVerifyPublicKeyString() throws InvalidKeyException,
java.security.cert.CertificateException, NoSuchAlgorithmException,
NoSuchProviderException, SignatureException, IOException,