diff options
author | Eric Holk <eholk@google.com> | 2018-11-08 16:40:16 -0800 |
---|---|---|
committer | Eric Holk <eholk@google.com> | 2018-11-13 13:47:29 -0800 |
commit | b392758a657e4dcedfe3b3823cbfe30dbbf352e2 (patch) | |
tree | 8d2471741f13187bc352ca97dd48bbf0dc00fc87 /startop/view_compiler/dex_builder_test | |
parent | 3cc4afc610ad418cb495a4f3072abc6b4fea51ba (diff) |
[view_compiler] DexBuilder: Add support for new and calling constructors
This change also includes support for calling methods with more that one
argument. In fact, we can go up to four.
Bug: 111895153
Change-Id: I49472171cefcf57cdfce2ac4d41646ed4df29074
Diffstat (limited to 'startop/view_compiler/dex_builder_test')
-rw-r--r-- | startop/view_compiler/dex_builder_test/src/android/startop/test/DexBuilderTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/startop/view_compiler/dex_builder_test/src/android/startop/test/DexBuilderTest.java b/startop/view_compiler/dex_builder_test/src/android/startop/test/DexBuilderTest.java index 2ccdc6d5b4bf..e20f3a9406c0 100644 --- a/startop/view_compiler/dex_builder_test/src/android/startop/test/DexBuilderTest.java +++ b/startop/view_compiler/dex_builder_test/src/android/startop/test/DexBuilderTest.java @@ -50,6 +50,14 @@ public class DexBuilderTest { } @Test + public void returnInteger5() throws Exception { + ClassLoader loader = loadDexFile("simple.dex"); + Class clazz = loader.loadClass("android.startop.test.testcases.SimpleTests"); + Method method = clazz.getMethod("returnInteger5"); + Assert.assertEquals(5, method.invoke(null)); + } + + @Test public void returnParam() throws Exception { ClassLoader loader = loadDexFile("simple.dex"); Class clazz = loader.loadClass("android.startop.test.testcases.SimpleTests"); |