1 /*
2  * Copyright 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 import java.lang.reflect.Method;
18 
19 public class Main {
main(String[] args)20     public static void main(String[] args) throws Exception {
21         Class<?> c = Class.forName("B146014745");
22         Method m1 = c.getDeclaredMethod("$noinline$testAppend1", String.class, int.class);
23         String b146014745_result1 = (String) m1.invoke(null, "x", 42);
24         assertEquals("x42x42", b146014745_result1);
25         Method m2 = c.getDeclaredMethod("$noinline$testAppend2", String.class, int.class);
26         String b146014745_result2 = (String) m2.invoke(null, "x", 42);
27         assertEquals("x42x42", b146014745_result2);
28         Method m3 = c.getDeclaredMethod("$noinline$testAppend3", String.class, int.class);
29         String b146014745_result3 = (String) m3.invoke(null, "x", 42);
30         assertEquals("x42x42", b146014745_result3);
31 
32         System.out.println("passed");
33     }
34 
assertEquals(String expected, String actual)35     public static void assertEquals(String expected, String actual) {
36         if (!expected.equals(actual)) {
37             throw new AssertionError("Expected: " + expected + ", actual: " + actual);
38         }
39     }
40 }
41