diff options
| author | Jesse Wilson <jessewilson@google.com> | 2009-09-30 15:33:46 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-09-30 15:33:46 -0700 |
| commit | 2b791cc256e80f93fef7db2157f1cee202133201 (patch) | |
| tree | 4a749782e316f2b43a472f085c665b383424dde9 | |
| parent | a20c6d2347224d89dced471e61a36610699b7e71 (diff) | |
| parent | 910363bd8d50c2a5558a71e47377928265c1219e (diff) | |
| download | android_dalvik-2b791cc256e80f93fef7db2157f1cee202133201.tar.gz android_dalvik-2b791cc256e80f93fef7db2157f1cee202133201.tar.bz2 android_dalvik-2b791cc256e80f93fef7db2157f1cee202133201.zip | |
am 910363bd: Merge change Ib5dc3f1f into eclair
Merge commit '910363bd8d50c2a5558a71e47377928265c1219e' into eclair-plus-aosp
* commit '910363bd8d50c2a5558a71e47377928265c1219e':
Fixing a lame test that was relying on hashmap iteration order.
| -rw-r--r-- | libcore/luni/src/test/java/tests/api/java/net/JarURLConnectionTest.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libcore/luni/src/test/java/tests/api/java/net/JarURLConnectionTest.java b/libcore/luni/src/test/java/tests/api/java/net/JarURLConnectionTest.java index 8303db357..7a67bf848 100644 --- a/libcore/luni/src/test/java/tests/api/java/net/JarURLConnectionTest.java +++ b/libcore/luni/src/test/java/tests/api/java/net/JarURLConnectionTest.java @@ -34,6 +34,8 @@ import java.security.cert.Certificate; import java.util.Collection; import java.util.Map; import java.util.Set; +import java.util.Arrays; +import java.util.HashSet; import java.util.jar.Attributes; import java.util.jar.JarEntry; import java.util.jar.JarFile; @@ -151,8 +153,7 @@ public class JarURLConnectionTest extends junit.framework.TestCase { args = {} ) public void test_getManifest() throws Exception { - - String [] expected = {"plus.bmp", "swt.dll"}; + //URL u = new URL("jar:" // + BASE.toString()+"/lf.jar!/swt.dll"); @@ -161,15 +162,9 @@ public class JarURLConnectionTest extends junit.framework.TestCase { juc = (JarURLConnection) u.openConnection(); Manifest manifest = juc.getManifest(); Map<String, Attributes> attr = manifest.getEntries(); - assertEquals(expected.length, attr.size()); - Set<String> keys = attr.keySet(); - String [] result = new String[expected.length]; - keys.toArray(result); + assertEquals(new HashSet<String>(Arrays.asList("plus.bmp", "swt.dll")), + attr.keySet()); - for(int i = 0; i < result.length; i++) { - assertEquals(expected[i], result[i]); - } - //URL invURL = new URL("jar:" // + BASE.toString()+"/InvalidJar.jar!/Test.class"); |
