diff options
author | Urs Grob <> | 2009-04-21 02:04:19 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-21 02:04:19 -0700 |
commit | 3e2d5e5270554027119f55790e105bace89320e0 (patch) | |
tree | 68b71dffe8f3a605beb05dc070ef1d2bafd4ac54 /luni | |
parent | 78032cf756f98070d5cf202b179e82997803fc9f (diff) | |
download | libcore-3e2d5e5270554027119f55790e105bace89320e0.zip libcore-3e2d5e5270554027119f55790e105bace89320e0.tar.gz libcore-3e2d5e5270554027119f55790e105bace89320e0.tar.bz2 |
AI 147118: Several fixes to reduce failing tests in the cts host
- Removing tests that are placed in a protected package name.
They were not part of the cts tests.
- Fixing a case of an Exception thrown in the static initializer of
GBCharsetEncoderTest.
- Remove copy/paste code which led to an exception in a 2nd thread
(the test did not fail, but its output was reported in logcat)
- fixing a test case in FileTest
- removing test code in StmtTest that tested badly specified operations and
failed.
BUG=1285921
Automated import of CL 147118
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/test/java/tests/api/java/io/FileTest.java | 9 | ||||
-rw-r--r-- | luni/src/test/java/tests/api/java/lang/ref/ReferenceTest.java | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/luni/src/test/java/tests/api/java/io/FileTest.java b/luni/src/test/java/tests/api/java/io/FileTest.java index 9ce3785..b35e85f 100644 --- a/luni/src/test/java/tests/api/java/io/FileTest.java +++ b/luni/src/test/java/tests/api/java/io/FileTest.java @@ -2463,10 +2463,17 @@ public class FileTest extends junit.framework.TestCase { subDir.mkdir(); assertTrue(subDir.exists()); + URL url = getClass().getResource("/HelloWorld.txt"); + String classPath = url.toString(); + int idx = classPath.indexOf("!"); + assertTrue("could not find the path of the test jar/apk", idx > 0); + classPath = classPath.substring(9, idx); // cutting off jar:file: + Support_Exec.execJava(new String[] { "tests.support.Support_DeleteOnExitTest", dir.getAbsolutePath(), subDir.getAbsolutePath() }, - new String[] { System.getProperty("java.class.path") }, false); + new String[] { System.getProperty("java.class.path"), + classPath }, false); Thread.sleep(2000); assertFalse(dir.exists()); assertFalse(subDir.exists()); diff --git a/luni/src/test/java/tests/api/java/lang/ref/ReferenceTest.java b/luni/src/test/java/tests/api/java/lang/ref/ReferenceTest.java index 7b7e169..33300b1 100644 --- a/luni/src/test/java/tests/api/java/lang/ref/ReferenceTest.java +++ b/luni/src/test/java/tests/api/java/lang/ref/ReferenceTest.java @@ -281,11 +281,6 @@ public class ReferenceTest extends junit.framework.TestCase { protected void finalize() { testObjectFinalized = true; - if (!testWeakReference.clearSeen) { - error = new AssertionFailedError("Clear should happen " + - "before finalize."); - throw error; - } } } |