blob: 1f23b95cf053131b9e62762f4891c29f23f16950 [file] [log] [blame]
jeffhao5d1ac922011-09-29 17:41:15 -07001/*
2 * Copyright (C) 2008 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
Hiroshi Yamauchi75d50532015-12-04 16:18:49 -080017import java.util.HashMap;
18
jeffhao5d1ac922011-09-29 17:41:15 -070019/**
20 * Test java.lang.reflect.Proxy
21 */
22public class Main {
23 public static void main(String[] args) {
Ian Rogers466bb252011-10-14 03:29:56 -070024 ReturnsAndArgPassing.main(null);
jeffhao5d1ac922011-09-29 17:41:15 -070025 BasicTest.main(null);
26 Clash.main(null);
27 Clash2.main(null);
28 Clash3.main(null);
29 Clash4.main(null);
30 WrappedThrow.main(null);
Ian Rogers530f71c2013-02-22 23:29:00 -080031 NarrowingTest.main(null);
Andreas Gampe96849ce2014-06-02 11:23:43 -070032 FloatSelect.main(null);
Andreas Gampee8067322015-09-08 17:42:59 -070033 NativeProxy.main(args);
jeffhao5d1ac922011-09-29 17:41:15 -070034 }
Hiroshi Yamauchi75d50532015-12-04 16:18:49 -080035
36 // The following code maps from the actual proxy class names (eg $Proxy2) to their test output
37 // names (eg $PROXY_CLASS_NAME1$). This is to avoid the flaky test failures due to potentially
38 // undeterministic proxy class naming.
39
40 public static void registerProxyClassName(String proxyClassName) {
41 proxyClassNameMap.put(proxyClassName,
42 "$PROXY_CLASS_NAME" + (uniqueTestProxyClassNum++) + "$");
43 }
44
45 public static String replaceProxyClassNamesForOutput(String str) {
46 for (String key : proxyClassNameMap.keySet()) {
47 str = str.replace(key, proxyClassNameMap.get(key));
48 }
49 return str;
50 }
51
52 private static final HashMap<String, String> proxyClassNameMap = new HashMap<String, String>();
53
54 private static int uniqueTestProxyClassNum = 0;
jeffhao5d1ac922011-09-29 17:41:15 -070055}