diff options
author | Elliott Hughes <enh@google.com> | 2012-04-06 17:10:10 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-04-09 09:55:00 -0700 |
commit | b264f081424642b06b0bbe7102781895d41faa9d (patch) | |
tree | 5ee2b94e5905ff69d3f138ebbecb7abe2a44149f /test/MyClassNatives | |
parent | b77799df950bf486abe3780185bc4932a3b47bad (diff) | |
download | art-b264f081424642b06b0bbe7102781895d41faa9d.tar.gz art-b264f081424642b06b0bbe7102781895d41faa9d.tar.bz2 art-b264f081424642b06b0bbe7102781895d41faa9d.zip |
Implement native method return value and upcall argument type checking.
Also clean up the CheckJNI testing a bit. I still need to do some work so that
JniAbort catches more of the detail, but this is a step forward.
Change-Id: Ibf5e32867d56123cff902ebf602406b731f567d2
Diffstat (limited to 'test/MyClassNatives')
-rw-r--r-- | test/MyClassNatives/MyClassNatives.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/MyClassNatives/MyClassNatives.java b/test/MyClassNatives/MyClassNatives.java index 49873731bf..9a03999f9b 100644 --- a/test/MyClassNatives/MyClassNatives.java +++ b/test/MyClassNatives/MyClassNatives.java @@ -14,7 +14,7 @@ * limitations under the License. */ -class MyClass { +class MyClassNatives { native void throwException(); native void foo(); native int bar(int count); @@ -32,4 +32,10 @@ class MyClass { static native void arraycopy(Object src, int src_pos, Object dst, int dst_pos, int length); native boolean compareAndSwapInt(Object obj, long offset, int expected, int newval); static native int getText(long val1, Object obj1, long val2, Object obj2); -} + + native Class instanceMethodThatShouldReturnClass(); + static native Class staticMethodThatShouldReturnClass(); + + native void instanceMethodThatShouldTakeClass(int i, Class c); + static native void staticMethodThatShouldTakeClass(int i, Class c); + } |