summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2010-06-22 11:18:16 -0700
committerJesse Wilson <jessewilson@google.com>2010-06-22 11:18:16 -0700
commit17baca0a1628322f512b2a91486d8f454b722ac2 (patch)
tree853ee3029efa34ef242f9ee6fcab4c30daf43c4e /support
parent0195eefc9e22519b20254ee6d3146da7bef07eb3 (diff)
downloadlibcore-17baca0a1628322f512b2a91486d8f454b722ac2.zip
libcore-17baca0a1628322f512b2a91486d8f454b722ac2.tar.gz
libcore-17baca0a1628322f512b2a91486d8f454b722ac2.tar.bz2
Deduplicating failed tests in org.apache.harmony.luni.tests.java.lang.
Some tests were copied from Harmony and fixed in Dalvik. I've applied fixes in our SVN copy of Harmony and removed the duplicate copies here. Also improving error reporting for missing resource files. Some of our serialization tests were failing due to missing files; the corresponding Harmony tests succeed. Change-Id: I73872b03674f8731ff237f575dcda66f9d53c06a
Diffstat (limited to 'support')
-rw-r--r--support/src/test/java/tests/support/resource/Support_Resources.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/support/src/test/java/tests/support/resource/Support_Resources.java b/support/src/test/java/tests/support/resource/Support_Resources.java
index 0bd0ccf..9643347 100644
--- a/support/src/test/java/tests/support/resource/Support_Resources.java
+++ b/support/src/test/java/tests/support/resource/Support_Resources.java
@@ -36,8 +36,12 @@ public class Support_Resources {
public static final String RESOURCE_PACKAGE_NAME = "tests.resources";
public static InputStream getStream(String name) {
- return Support_Resources.class.getResourceAsStream(RESOURCE_PACKAGE
- + name);
+ String path = RESOURCE_PACKAGE + name;
+ InputStream result = Support_Resources.class.getResourceAsStream(path);
+ if (result == null) {
+ throw new IllegalArgumentException("No such resource: " + path);
+ }
+ return result;
}
public static String getURL(String name) {