summaryrefslogtreecommitdiff
path: root/test/044-proxy/src/BasicTest.java
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2011-10-14 03:29:56 -0700
committerIan Rogers <irogers@google.com>2011-10-14 21:45:27 -0700
commit466bb25416b88fabd5d4387b7c7e5cc1ece78b8c (patch)
tree8d0952cbd850f1d0ac2e43a8372ce571fb4982d1 /test/044-proxy/src/BasicTest.java
parenta10cd94bb77ed66fa0a8b66141c4504045c92d30 (diff)
Proxy implementation
This rounds out the proxy implementation by adding missing pieces to the class linker, extending tests and fixing issues in the runtime support. There are also some tweaks for performance and to clean up Method/Object a little. A unit test of the functionality is "art/test/run-test 044" Change-Id: Id94102d10b81cd9b12b95ba8618f6187490204c4
Diffstat (limited to 'test/044-proxy/src/BasicTest.java')
-rw-r--r--test/044-proxy/src/BasicTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/044-proxy/src/BasicTest.java b/test/044-proxy/src/BasicTest.java
index 2a453c47f7..fa1896fd9a 100644
--- a/test/044-proxy/src/BasicTest.java
+++ b/test/044-proxy/src/BasicTest.java
@@ -22,6 +22,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.Arrays;
+import java.util.Comparator;
/**
* Do some basic tests.
@@ -70,6 +71,11 @@ public class BasicTest {
*/
System.out.println("");
Method[] methods = proxy.getClass().getDeclaredMethods();
+ Arrays.sort(methods, new Comparator<Method>() {
+ public int compare(Method o1, Method o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ });
System.out.println("Proxy methods: " + Arrays.deepToString(methods));
Method meth = methods[methods.length -1];
System.out.println("Decl annos: " + Arrays.deepToString(meth.getDeclaredAnnotations()));
@@ -77,6 +83,11 @@ public class BasicTest {
System.out.println("Param annos (" + paramAnnos.length + ") : "
+ Arrays.deepToString(paramAnnos));
Field[] fields = proxy.getClass().getDeclaredFields();
+ Arrays.sort(fields, new Comparator<Field>() {
+ public int compare(Field o1, Field o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ });
System.out.println("Proxy fields: " + Arrays.deepToString(fields));
}