summaryrefslogtreecommitdiffstats
path: root/luni/src
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2011-01-17 13:31:40 -0800
committerDan Bornstein <danfuzz@android.com>2011-01-17 13:31:40 -0800
commit51d35175d7cce2afc5c9cdd1ef939d60481cd398 (patch)
tree72c35d9e09becbad43d7334b841a51d6f88d6683 /luni/src
parent0ec98177a2b2ea242a9ca9e0fb5aee39bba0c007 (diff)
downloadlibcore-51d35175d7cce2afc5c9cdd1ef939d60481cd398.zip
libcore-51d35175d7cce2afc5c9cdd1ef939d60481cd398.tar.gz
libcore-51d35175d7cce2afc5c9cdd1ef939d60481cd398.tar.bz2
Naming: Reduce confusion, increase consistency.
Change-Id: I25e5fccac4c025e35d45d4920d9f2308c658ec53
Diffstat (limited to 'luni/src')
-rw-r--r--luni/src/test/etc/loading-test-jar/TestMethods.java (renamed from luni/src/test/etc/loading-test-jar/Test2.java)6
-rw-r--r--luni/src/test/java/dalvik/system/DexClassLoaderTest.java36
-rw-r--r--luni/src/test/resources/dalvik/system/loading-test.dexbin3960 -> 3972 bytes
-rw-r--r--luni/src/test/resources/dalvik/system/loading-test.jarbin2545 -> 2551 bytes
4 files changed, 21 insertions, 21 deletions
diff --git a/luni/src/test/etc/loading-test-jar/Test2.java b/luni/src/test/etc/loading-test-jar/TestMethods.java
index 9accb2d..aa9b3cd 100644
--- a/luni/src/test/etc/loading-test-jar/Test2.java
+++ b/luni/src/test/etc/loading-test-jar/TestMethods.java
@@ -27,7 +27,7 @@ import java.io.InputStream;
* method in this class is called from the same-named method in
* {@code DexClassLoaderTest}.
*/
-public class Test2 {
+public class TestMethods {
/*
* The following are all simple utility methods which, under
* normal circumstances, would be part of other libraries
@@ -123,7 +123,7 @@ public class Test2 {
* file as this class.
*/
public static void test_getResourceAsStream() throws IOException {
- ClassLoader cl = Test2.class.getClassLoader();
+ ClassLoader cl = TestMethods.class.getClassLoader();
InputStream in = cl.getResourceAsStream("test/Resource1.txt");
byte[] contents = readFully(in);
String s = new String(contents, "UTF-8");
@@ -179,7 +179,7 @@ public class Test2 {
* file as this class.
*/
public static void test_diff_getResourceAsStream() throws IOException {
- ClassLoader cl = Test2.class.getClassLoader();
+ ClassLoader cl = TestMethods.class.getClassLoader();
InputStream in = cl.getResourceAsStream("test2/Resource2.txt");
byte[] contents = readFully(in);
String s = new String(contents, "UTF-8");
diff --git a/luni/src/test/java/dalvik/system/DexClassLoaderTest.java b/luni/src/test/java/dalvik/system/DexClassLoaderTest.java
index cc22b8c..1ffae4a 100644
--- a/luni/src/test/java/dalvik/system/DexClassLoaderTest.java
+++ b/luni/src/test/java/dalvik/system/DexClassLoaderTest.java
@@ -37,10 +37,10 @@ public class DexClassLoaderTest extends TestCase {
private static final String DEX_NAME = "loading-test.dex";
private static final String JAR2_NAME = "loading-test2.jar";
private static final String DEX2_NAME = "loading-test2.dex";
- private static final File TMP_JAR = new File(TMP_DIR, JAR_NAME);
- private static final File TMP_DEX = new File(TMP_DIR, DEX_NAME);
- private static final File TMP_JAR2 = new File(TMP_DIR, JAR2_NAME);
- private static final File TMP_DEX2 = new File(TMP_DIR, DEX2_NAME);
+ private static final File JAR_FILE = new File(TMP_DIR, JAR_NAME);
+ private static final File DEX_FILE = new File(TMP_DIR, DEX_NAME);
+ private static final File JAR2_FILE = new File(TMP_DIR, JAR2_NAME);
+ private static final File DEX2_FILE = new File(TMP_DIR, DEX2_NAME);
private static enum Configuration {
/** just one classpath element, a raw dex file */
@@ -60,10 +60,10 @@ public class DexClassLoaderTest extends TestCase {
TMP_DIR.mkdirs();
ClassLoader cl = DexClassLoaderTest.class.getClassLoader();
- copyResource(cl, JAR_NAME, TMP_JAR);
- copyResource(cl, DEX_NAME, TMP_DEX);
- copyResource(cl, JAR2_NAME, TMP_JAR2);
- copyResource(cl, DEX2_NAME, TMP_DEX2);
+ copyResource(cl, JAR_NAME, JAR_FILE);
+ copyResource(cl, DEX_NAME, DEX_FILE);
+ copyResource(cl, JAR2_NAME, JAR2_FILE);
+ copyResource(cl, DEX2_NAME, DEX2_FILE);
}
/**
@@ -89,10 +89,10 @@ public class DexClassLoaderTest extends TestCase {
File file2;
switch (config) {
- case ONE_DEX: file1 = TMP_DEX; file2 = null; break;
- case ONE_JAR: file1 = TMP_JAR; file2 = null; break;
- case TWO_DEX: file1 = TMP_DEX; file2 = TMP_DEX2; break;
- case TWO_JAR: file1 = TMP_JAR; file2 = TMP_JAR2; break;
+ case ONE_DEX: file1 = DEX_FILE; file2 = null; break;
+ case ONE_JAR: file1 = JAR_FILE; file2 = null; break;
+ case TWO_DEX: file1 = DEX_FILE; file2 = DEX2_FILE; break;
+ case TWO_JAR: file1 = JAR_FILE; file2 = JAR2_FILE; break;
default: throw new AssertionError("shouldn't happen");
}
@@ -157,25 +157,25 @@ public class DexClassLoaderTest extends TestCase {
public static void test_callStaticMethod(Configuration config)
throws Exception {
createInstanceAndCallStaticMethod(
- config, "test.Test2", "test_callStaticMethod");
+ config, "test.TestMethods", "test_callStaticMethod");
}
public static void test_getStaticVariable(Configuration config)
throws Exception {
createInstanceAndCallStaticMethod(
- config, "test.Test2", "test_getStaticVariable");
+ config, "test.TestMethods", "test_getStaticVariable");
}
public static void test_callInstanceMethod(Configuration config)
throws Exception {
createInstanceAndCallStaticMethod(
- config, "test.Test2", "test_callInstanceMethod");
+ config, "test.TestMethods", "test_callInstanceMethod");
}
public static void test_getInstanceVariable(Configuration config)
throws Exception {
createInstanceAndCallStaticMethod(
- config, "test.Test2", "test_getInstanceVariable");
+ config, "test.TestMethods", "test_getInstanceVariable");
}
/*
@@ -273,7 +273,7 @@ public class DexClassLoaderTest extends TestCase {
public static void test_getResourceAsStream(Configuration config)
throws Exception {
createInstanceAndCallStaticMethod(
- config, "test.Test2", "test_getResourceAsStream");
+ config, "test.TestMethods", "test_getResourceAsStream");
}
public void test_directGetResourceAsStream() throws Exception {
@@ -310,7 +310,7 @@ public class DexClassLoaderTest extends TestCase {
public static void test_diff_getResourceAsStream2()
throws Exception {
createInstanceAndCallStaticMethod(
- Configuration.TWO_JAR, "test.Test2",
+ Configuration.TWO_JAR, "test.TestMethods",
"test_diff_getResourceAsStream");
}
}
diff --git a/luni/src/test/resources/dalvik/system/loading-test.dex b/luni/src/test/resources/dalvik/system/loading-test.dex
index 3d13917..1d0f50e 100644
--- a/luni/src/test/resources/dalvik/system/loading-test.dex
+++ b/luni/src/test/resources/dalvik/system/loading-test.dex
Binary files differ
diff --git a/luni/src/test/resources/dalvik/system/loading-test.jar b/luni/src/test/resources/dalvik/system/loading-test.jar
index d8edf44..a0a10fa 100644
--- a/luni/src/test/resources/dalvik/system/loading-test.jar
+++ b/luni/src/test/resources/dalvik/system/loading-test.jar
Binary files differ