diff options
Diffstat (limited to 'jack-tests/tests/com/android/jack/shrob/test032')
14 files changed, 199 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/shrob/test032/info.txt b/jack-tests/tests/com/android/jack/shrob/test032/info.txt new file mode 100644 index 0000000..333c864 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/info.txt @@ -0,0 +1,5 @@ +This test creates a class with a method m() and its subclass which implements an interface +that defines a method m as well. +Both m() methods should be kept (see test030). +Another inheritance branch with the same methods has been added and it contains a reference +to the enclosing type of the concrete m() method in the other branch.
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/shrob/test032/jack/A.java b/jack-tests/tests/com/android/jack/shrob/test032/jack/A.java new file mode 100644 index 0000000..4f8e189 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/jack/A.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2013 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.shrob.test032.jack; + +public class A { + public int m() { + return 5; + } +} diff --git a/jack-tests/tests/com/android/jack/shrob/test032/jack/B.java b/jack-tests/tests/com/android/jack/shrob/test032/jack/B.java new file mode 100644 index 0000000..9086345 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/jack/B.java @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2013 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.shrob.test032.jack; + +public class B extends A implements I { +} diff --git a/jack-tests/tests/com/android/jack/shrob/test032/jack/C.java b/jack-tests/tests/com/android/jack/shrob/test032/jack/C.java new file mode 100644 index 0000000..320b13d --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/jack/C.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2013 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.shrob.test032.jack; + +public class C implements I { + @Override + public int m() { + B b = new B(); + return 7; + } +} diff --git a/jack-tests/tests/com/android/jack/shrob/test032/jack/I.java b/jack-tests/tests/com/android/jack/shrob/test032/jack/I.java new file mode 100644 index 0000000..16eba74 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/jack/I.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2013 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.shrob.test032.jack; + +public interface I { + int m(); +} diff --git a/jack-tests/tests/com/android/jack/shrob/test032/jack/Kept.java b/jack-tests/tests/com/android/jack/shrob/test032/jack/Kept.java new file mode 100644 index 0000000..489696f --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/jack/Kept.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2013 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.shrob.test032.jack; + + +public class Kept { + public static int kept(I i) { + C c = new C(); + return i.m(); + } +} diff --git a/jack-tests/tests/com/android/jack/shrob/test032/proguard.flags001 b/jack-tests/tests/com/android/jack/shrob/test032/proguard.flags001 new file mode 100644 index 0000000..ec1c2ac --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/proguard.flags001 @@ -0,0 +1,5 @@ +-keep class **.C + +-keep class **.Kept { + *; +}
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/shrob/test032/proguard.flags001.mapping b/jack-tests/tests/com/android/jack/shrob/test032/proguard.flags001.mapping new file mode 100644 index 0000000..ac19db9 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/proguard.flags001.mapping @@ -0,0 +1,4 @@ +com.android.jack.shrob.test032.jack.I -> com.android.jack.shrob.test032.jack.a: +com.android.jack.shrob.test032.jack.B -> com.android.jack.shrob.test032.jack.b: +com.android.jack.shrob.test032.jack.A -> com.android.jack.shrob.test032.jack.c: + int m() -> a diff --git a/jack-tests/tests/com/android/jack/shrob/test032/refsFlattenPackage/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test032/refsFlattenPackage/expected-001.txt new file mode 100644 index 0000000..c99e106 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/refsFlattenPackage/expected-001.txt @@ -0,0 +1,13 @@ +com.android.jack.shrob.test032.jack.Kept -> com.android.jack.shrob.test032.jack.Kept: + void <init>() -> <init> + int kept(com.android.jack.shrob.test032.jack.I) -> kept +com.android.jack.shrob.test032.jack.I -> com.android.jack.shrob.test032.jack.V: + int m() -> z__ +com.android.jack.shrob.test032.jack.B -> com.android.jack.shrob.test032.jack.O: + void <init>() -> <init> +com.android.jack.shrob.test032.jack.C -> com.android.jack.shrob.test032.jack.C: + void <init>() -> <init> + int m() -> z__ +com.android.jack.shrob.test032.jack.A -> com.android.jack.shrob.test032.jack.N: + void <init>() -> <init> + int m() -> z__ diff --git a/jack-tests/tests/com/android/jack/shrob/test032/refsObfuscationWithMapping/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test032/refsObfuscationWithMapping/expected-001.txt new file mode 100644 index 0000000..c9a8f93 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/refsObfuscationWithMapping/expected-001.txt @@ -0,0 +1,13 @@ +com.android.jack.shrob.test032.jack.Kept -> com.android.jack.shrob.test032.jack.Kept: + void <init>() -> <init> + int kept(com.android.jack.shrob.test032.jack.I) -> kept +com.android.jack.shrob.test032.jack.I -> com.android.jack.shrob.test032.jack.a: + int m() -> a +com.android.jack.shrob.test032.jack.B -> com.android.jack.shrob.test032.jack.b: + void <init>() -> <init> +com.android.jack.shrob.test032.jack.C -> com.android.jack.shrob.test032.jack.C: + void <init>() -> <init> + int m() -> a +com.android.jack.shrob.test032.jack.A -> com.android.jack.shrob.test032.jack.c: + void <init>() -> <init> + int m() -> a diff --git a/jack-tests/tests/com/android/jack/shrob/test032/refsObfuscationWithoutMapping/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test032/refsObfuscationWithoutMapping/expected-001.txt new file mode 100644 index 0000000..c99e106 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/refsObfuscationWithoutMapping/expected-001.txt @@ -0,0 +1,13 @@ +com.android.jack.shrob.test032.jack.Kept -> com.android.jack.shrob.test032.jack.Kept: + void <init>() -> <init> + int kept(com.android.jack.shrob.test032.jack.I) -> kept +com.android.jack.shrob.test032.jack.I -> com.android.jack.shrob.test032.jack.V: + int m() -> z__ +com.android.jack.shrob.test032.jack.B -> com.android.jack.shrob.test032.jack.O: + void <init>() -> <init> +com.android.jack.shrob.test032.jack.C -> com.android.jack.shrob.test032.jack.C: + void <init>() -> <init> + int m() -> z__ +com.android.jack.shrob.test032.jack.A -> com.android.jack.shrob.test032.jack.N: + void <init>() -> <init> + int m() -> z__ diff --git a/jack-tests/tests/com/android/jack/shrob/test032/refsRepackageClasses/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test032/refsRepackageClasses/expected-001.txt new file mode 100644 index 0000000..369f801 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/refsRepackageClasses/expected-001.txt @@ -0,0 +1,13 @@ +com.android.jack.shrob.test032.jack.A -> N: + void <init>() -> <init> + int m() -> z__ +com.android.jack.shrob.test032.jack.B -> O: + void <init>() -> <init> +com.android.jack.shrob.test032.jack.I -> V: + int m() -> z__ +com.android.jack.shrob.test032.jack.Kept -> com.android.jack.shrob.test032.jack.Kept: + void <init>() -> <init> + int kept(com.android.jack.shrob.test032.jack.I) -> kept +com.android.jack.shrob.test032.jack.C -> com.android.jack.shrob.test032.jack.C: + void <init>() -> <init> + int m() -> z__ diff --git a/jack-tests/tests/com/android/jack/shrob/test032/refsSeed/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test032/refsSeed/expected-001.txt new file mode 100644 index 0000000..1e2f4db --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/refsSeed/expected-001.txt @@ -0,0 +1,6 @@ +com.android.jack.shrob.test032.jack.C +com.android.jack.shrob.test032.jack.Kept +com.android.jack.shrob.test032.jack.Kept: Kept() +com.android.jack.shrob.test032.jack.Kept: int kept(com.android.jack.shrob.test032.jack.I) +com.android.jack.shrob.test032.jack.Kept: void <clinit>() +com.android.jack.shrob.test032.jack.Kept: void $init()
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/shrob/test032/refsShrinking/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test032/refsShrinking/expected-001.txt new file mode 100644 index 0000000..6395beb --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test032/refsShrinking/expected-001.txt @@ -0,0 +1,13 @@ +Lcom/android/jack/shrob/test032/jack/C;: +<init>()V +m()I +Lcom/android/jack/shrob/test032/jack/Kept;: +<init>()V +kept(Lcom/android/jack/shrob/test032/jack/I;)I +Lcom/android/jack/shrob/test032/jack/I;: +m()I +Lcom/android/jack/shrob/test032/jack/A;: +<init>()V +m()I +Lcom/android/jack/shrob/test032/jack/B;: +<init>()V |