summaryrefslogtreecommitdiffstats
path: root/jack-tests
diff options
context:
space:
mode:
authorYohann Roussel <yroussel@google.com>2014-04-17 14:28:23 +0200
committerYohann Roussel <yroussel@google.com>2014-04-18 11:19:26 +0200
commit2aef65555a4b94819d67c91735cbf46620d7e0b0 (patch)
tree09d458d62811d12808a6767df61afaf7e7c33326 /jack-tests
parentae67f70b44b2ecc294aa3b74de9843e7a384e326 (diff)
downloadtoolchain_jack-2aef65555a4b94819d67c91735cbf46620d7e0b0.zip
toolchain_jack-2aef65555a4b94819d67c91735cbf46620d7e0b0.tar.gz
toolchain_jack-2aef65555a4b94819d67c91735cbf46620d7e0b0.tar.bz2
Test compiling outer and inner separately.
Change-Id: I5375cebe630bfeeb4f442e1f675dfda5e5545a03
Diffstat (limited to 'jack-tests')
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test001/jack/A.java29
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test001/obf1.flags3
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test001/obf2.flags3
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test001/shrink1.flags3
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test001/shrink2.flags3
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test002/jack/A.java42
-rw-r--r--jack-tests/tests/com/android/jack/withphantom/test002/obf1.flags5
7 files changed, 88 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/withphantom/test001/jack/A.java b/jack-tests/tests/com/android/jack/withphantom/test001/jack/A.java
new file mode 100644
index 0000000..a518de1
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test001/jack/A.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.jack.withphantom.test001.jack;
+
+public class A {
+
+ public static class Inner1 {
+
+ }
+
+ class Inner2 {
+
+ }
+
+}
diff --git a/jack-tests/tests/com/android/jack/withphantom/test001/obf1.flags b/jack-tests/tests/com/android/jack/withphantom/test001/obf1.flags
new file mode 100644
index 0000000..c5ae4c3
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test001/obf1.flags
@@ -0,0 +1,3 @@
+-dontoptimize
+-keep,allowobfuscation public class com.android.jack.withphantom.test001.jack.A {
+}
diff --git a/jack-tests/tests/com/android/jack/withphantom/test001/obf2.flags b/jack-tests/tests/com/android/jack/withphantom/test001/obf2.flags
new file mode 100644
index 0000000..eba8b52
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test001/obf2.flags
@@ -0,0 +1,3 @@
+-dontoptimize
+-keep,allowobfuscation public class com.android.jack.withphantom.test001.jack.A$Inner1 {
+}
diff --git a/jack-tests/tests/com/android/jack/withphantom/test001/shrink1.flags b/jack-tests/tests/com/android/jack/withphantom/test001/shrink1.flags
new file mode 100644
index 0000000..b31a937
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test001/shrink1.flags
@@ -0,0 +1,3 @@
+-dontoptimize -dontobfuscate
+-keep public class com.android.jack.withphantom.test001.jack.A {
+}
diff --git a/jack-tests/tests/com/android/jack/withphantom/test001/shrink2.flags b/jack-tests/tests/com/android/jack/withphantom/test001/shrink2.flags
new file mode 100644
index 0000000..40963b3
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test001/shrink2.flags
@@ -0,0 +1,3 @@
+-dontoptimize -dontobfuscate
+-keep public class com.android.jack.withphantom.test001.jack.A$Inner {
+}
diff --git a/jack-tests/tests/com/android/jack/withphantom/test002/jack/A.java b/jack-tests/tests/com/android/jack/withphantom/test002/jack/A.java
new file mode 100644
index 0000000..e416eb3
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test002/jack/A.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.jack.withphantom.test002.jack;
+
+public class A {
+
+ public static Object m() {
+ return new Object() {
+ @Override
+ public String toString() {
+ return "Anonymous";
+ }
+ };
+
+ }
+
+ public static Object m2() {
+ class Named {
+ @Override
+ public String toString() {
+ return "Named";
+ }
+
+ }
+ return new Named();
+ }
+
+}
diff --git a/jack-tests/tests/com/android/jack/withphantom/test002/obf1.flags b/jack-tests/tests/com/android/jack/withphantom/test002/obf1.flags
new file mode 100644
index 0000000..062cfb9
--- /dev/null
+++ b/jack-tests/tests/com/android/jack/withphantom/test002/obf1.flags
@@ -0,0 +1,5 @@
+-dontoptimize
+-keep,allowobfuscation public class com.android.jack.withphantom.test002.jack.A {
+}
+-keep,allowobfuscation public class com.android.jack.withphantom.test002.jack.A$* {
+}