diff options
Diffstat (limited to 'jack-tests/tests/com/android/jack/shrob/test034')
10 files changed, 89 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/shrob/test034/info.txt b/jack-tests/tests/com/android/jack/shrob/test034/info.txt new file mode 100644 index 0000000..9b07ebe --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/info.txt @@ -0,0 +1,2 @@ +This tests contains two classes with the same enclosing package. One has a mapping entry, the other has not. +They have to stay in the same package for the test to pass. This time we use the -repackageclasses option.
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/shrob/test034/jack/A.java b/jack-tests/tests/com/android/jack/shrob/test034/jack/A.java new file mode 100644 index 0000000..f7a841a --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/jack/A.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.test034.jack; + +public class A { + static int f = 8; +} diff --git a/jack-tests/tests/com/android/jack/shrob/test034/jack/B.java b/jack-tests/tests/com/android/jack/shrob/test034/jack/B.java new file mode 100644 index 0000000..420dc46 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/jack/B.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.test034.jack; + +public class B { + public static int m() { + return A.f; + } +} diff --git a/jack-tests/tests/com/android/jack/shrob/test034/mapping.flags b/jack-tests/tests/com/android/jack/shrob/test034/mapping.flags new file mode 100644 index 0000000..d805e64 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/mapping.flags @@ -0,0 +1 @@ +com.android.jack.shrob.test034.jack.A -> p.C:
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/shrob/test034/proguard.flags001 b/jack-tests/tests/com/android/jack/shrob/test034/proguard.flags001 new file mode 100644 index 0000000..bd19413 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/proguard.flags001 @@ -0,0 +1,7 @@ +-applymapping mapping.flags + +-repackageclasses 'p2' + +-keep,allowobfuscation class * { + *; +} diff --git a/jack-tests/tests/com/android/jack/shrob/test034/refsFlattenPackage/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test034/refsFlattenPackage/expected-001.txt new file mode 100644 index 0000000..4bbe7ec --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/refsFlattenPackage/expected-001.txt @@ -0,0 +1,7 @@ +com.android.jack.shrob.test034.jack.B -> d2.O: + void <init>() -> <init> + int m() -> z__ +com.android.jack.shrob.test034.jack.A -> p.C: + int f -> s:V + void <init>() -> <init> + void <clinit>() -> <clinit> diff --git a/jack-tests/tests/com/android/jack/shrob/test034/refsObfuscationWithoutMapping/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test034/refsObfuscationWithoutMapping/expected-001.txt new file mode 100644 index 0000000..5d5eb21 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/refsObfuscationWithoutMapping/expected-001.txt @@ -0,0 +1,4 @@ +com.android.jack.shrob.test033.jack.A -> p.C: + int f -> a +com.android.jack.shrob.test033.jack.B -> p.O: + int m() -> a
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/shrob/test034/refsRepackageClasses/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test034/refsRepackageClasses/expected-001.txt new file mode 100644 index 0000000..8155bbc --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/refsRepackageClasses/expected-001.txt @@ -0,0 +1,7 @@ +com.android.jack.shrob.test034.jack.A -> p.C: + int f -> s:V + void <clinit>() -> <clinit> + void <init>() -> <init> +com.android.jack.shrob.test034.jack.B -> O: + void <init>() -> <init> + int m() -> z__ diff --git a/jack-tests/tests/com/android/jack/shrob/test034/refsSeed/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test034/refsSeed/expected-001.txt new file mode 100644 index 0000000..fc57690 --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/refsSeed/expected-001.txt @@ -0,0 +1,10 @@ +com.android.jack.shrob.test034.jack.A +com.android.jack.shrob.test034.jack.A: int f +com.android.jack.shrob.test034.jack.A: A() +com.android.jack.shrob.test034.jack.A: void <clinit>() +com.android.jack.shrob.test034.jack.A: void $init() +com.android.jack.shrob.test034.jack.B +com.android.jack.shrob.test034.jack.B: B() +com.android.jack.shrob.test034.jack.B: int m() +com.android.jack.shrob.test034.jack.B: void <clinit>() +com.android.jack.shrob.test034.jack.B: void $init() diff --git a/jack-tests/tests/com/android/jack/shrob/test034/refsShrinking/expected-001.txt b/jack-tests/tests/com/android/jack/shrob/test034/refsShrinking/expected-001.txt new file mode 100644 index 0000000..bebd1bf --- /dev/null +++ b/jack-tests/tests/com/android/jack/shrob/test034/refsShrinking/expected-001.txt @@ -0,0 +1,7 @@ +Lcom/android/jack/shrob/test034/jack/A;: +I f +<clinit>()V +<init>()V +Lcom/android/jack/shrob/test034/jack/B;: +<init>()V +m()I |