[tests] extends Java decompiler test data; drops duplicated test

master
Roman Shevchenko 6 years ago
parent 6de5e9717c
commit 7656bbdd68
  1. 1
      test/org/jetbrains/java/decompiler/SingleClassesTest.java
  2. BIN
      testData/classes/pkg/TestInnerLocal$1Inner.class
  3. BIN
      testData/classes/pkg/TestInnerLocal$2Inner.class
  4. BIN
      testData/classes/pkg/TestInnerLocal$Inner1.class
  5. BIN
      testData/classes/pkg/TestInnerLocal$Inner1Static$Inner2Static.class
  6. BIN
      testData/classes/pkg/TestInnerLocal$Inner1Static.class
  7. BIN
      testData/classes/pkg/TestInnerLocal.class
  8. BIN
      testData/classes/pkg/TestInnerLocalPkg$1Inner.class
  9. BIN
      testData/classes/pkg/TestInnerLocalPkg$2Inner.class
  10. BIN
      testData/classes/pkg/TestInnerLocalPkg$Inner1.class
  11. BIN
      testData/classes/pkg/TestInnerLocalPkg$Inner1Static$Inner2Static.class
  12. BIN
      testData/classes/pkg/TestInnerLocalPkg$Inner1Static.class
  13. BIN
      testData/classes/pkg/TestInnerLocalPkg.class
  14. BIN
      testData/classes/pkg/TestInnerSignature$Inner.class
  15. BIN
      testData/classes/pkg/TestInnerSignature$InnerStatic.class
  16. BIN
      testData/classes/pkg/TestInnerSignature.class
  17. 152
      testData/results/TestInnerLocal.dec
  18. 135
      testData/results/TestInnerLocalPkg.dec
  19. 94
      testData/results/TestInnerSignature.dec
  20. 26
      testData/src/pkg/TestInnerLocal.java
  21. 65
      testData/src/pkg/TestInnerLocalPkg.java
  22. 22
      testData/src/pkg/TestInnerSignature.java

@ -66,7 +66,6 @@ public class SingleClassesTest {
@Test public void testAnonymousClass() { doTest("pkg/TestAnonymousClass"); } @Test public void testAnonymousClass() { doTest("pkg/TestAnonymousClass"); }
@Test public void testThrowException() { doTest("pkg/TestThrowException"); } @Test public void testThrowException() { doTest("pkg/TestThrowException"); }
@Test public void testInnerLocal() { doTest("pkg/TestInnerLocal"); } @Test public void testInnerLocal() { doTest("pkg/TestInnerLocal"); }
@Test public void testInnerLocalPkg() { doTest("pkg/TestInnerLocalPkg"); }
@Test public void testInnerSignature() { doTest("pkg/TestInnerSignature"); } @Test public void testInnerSignature() { doTest("pkg/TestInnerSignature"); }
@Test public void testAnonymousSignature() { doTest("pkg/TestAnonymousSignature"); } @Test public void testAnonymousSignature() { doTest("pkg/TestAnonymousSignature"); }
@Test public void testLocalsSignature() { doTest("pkg/TestLocalsSignature"); } @Test public void testLocalsSignature() { doTest("pkg/TestLocalsSignature"); }

@ -1,133 +1,135 @@
package pkg;
public class TestInnerLocal { public class TestInnerLocal {
public static void testStaticMethod() { public static void testStaticMethod() {
class Inner { class Inner {
final String x; final String x;
public Inner(String var1) { public Inner(@Deprecated String x) {
this.x = var1;// 22 this.x = x;// 8
}// 23 }// 9
} }
new Inner("test");// 25 new Inner("test");// 11
new TestInnerLocal.Inner1Static("test");// 26 new TestInnerLocal.Inner1Static("test");// 12
new TestInnerLocal.Inner1Static.Inner2Static("test");// 27 new TestInnerLocal.Inner1Static.Inner2Static("test");// 13
}// 28 }// 14
public void testMethod() { public void testMethod() {
class Inner { class Inner {
final String x; final String x;
public Inner(String var2) { public Inner(@Deprecated String x) {
this.x = var2;// 34 this.x = x;// 20
}// 35 }// 21
} }
new Inner("test");// 37 new Inner("test");// 23
new TestInnerLocal.Inner1Static("test");// 38 new TestInnerLocal.Inner1Static("test");// 24
new TestInnerLocal.Inner1("test");// 39 new TestInnerLocal.Inner1("test");// 25
new TestInnerLocal.Inner1Static.Inner2Static("test");// 40 new TestInnerLocal.Inner1Static.Inner2Static("test");// 26
}// 41 }// 27
static class Inner1Static { static class Inner1Static {
final String x; final String x;
public Inner1Static(String var1) { public Inner1Static(@Deprecated String x) {
this.x = var1;// 53 this.x = x;// 39
}// 54 }// 40
public static class Inner2Static { public static class Inner2Static {
final String x; final String x;
public Inner2Static(String var1) { public Inner2Static(@Deprecated String x) {
this.x = var1;// 59 this.x = x;// 45
}// 60 }// 46
} }
} }
class Inner1 { class Inner1 {
final String x; final String x;
public Inner1(String var2) { public Inner1(@Deprecated String x) {
this.x = var2;// 46 this.x = x;// 32
}// 47 }// 33
} }
} }
class 'TestInnerLocal$1Inner' { class 'pkg/TestInnerLocal$1Inner' {
method '<init> (Ljava/lang/String;)V' { method '<init> (Ljava/lang/String;)V' {
6 6 6 8
9 7 9 9
} }
} }
class 'TestInnerLocal' { class 'pkg/TestInnerLocal' {
method 'testStaticMethod ()V' { method 'testStaticMethod ()V' {
4 10 4 12
e 11 e 13
18 12 18 14
1e 13 1e 15
} }
method 'testMethod ()V' { method 'testMethod ()V' {
5 24 5 26
f 25 f 27
1a 26 1a 28
24 27 24 29
2a 28 2a 30
} }
} }
class 'TestInnerLocal$2Inner' { class 'pkg/TestInnerLocal$2Inner' {
method '<init> (LTestInnerLocal;Ljava/lang/String;)V' { method '<init> (Lpkg/TestInnerLocal;Ljava/lang/String;)V' {
b 20 b 22
e 21 e 23
} }
} }
class 'TestInnerLocal$Inner1Static' { class 'pkg/TestInnerLocal$Inner1Static' {
method '<init> (Ljava/lang/String;)V' { method '<init> (Ljava/lang/String;)V' {
6 34 6 36
9 35 9 37
} }
} }
class 'TestInnerLocal$Inner1Static$Inner2Static' { class 'pkg/TestInnerLocal$Inner1Static$Inner2Static' {
method '<init> (Ljava/lang/String;)V' { method '<init> (Ljava/lang/String;)V' {
6 41 6 43
9 42 9 44
} }
} }
class 'TestInnerLocal$Inner1' { class 'pkg/TestInnerLocal$Inner1' {
method '<init> (LTestInnerLocal;Ljava/lang/String;)V' { method '<init> (Lpkg/TestInnerLocal;Ljava/lang/String;)V' {
b 50 b 52
e 51 e 53
} }
} }
Lines mapping: Lines mapping:
22 <-> 7 8 <-> 9
23 <-> 8 9 <-> 10
25 <-> 11 11 <-> 13
26 <-> 12 12 <-> 14
27 <-> 13 13 <-> 15
28 <-> 14 14 <-> 16
34 <-> 21 20 <-> 23
35 <-> 22 21 <-> 24
37 <-> 25 23 <-> 27
38 <-> 26 24 <-> 28
39 <-> 27 25 <-> 29
40 <-> 28 26 <-> 30
41 <-> 29 27 <-> 31
46 <-> 51 32 <-> 53
47 <-> 52 33 <-> 54
53 <-> 35 39 <-> 37
54 <-> 36 40 <-> 38
59 <-> 42 45 <-> 44
60 <-> 43 46 <-> 45
Not mapped: Not mapped:
21 7
33 19
45 31
52 38
58 44

@ -1,135 +0,0 @@
package pkg;
public class TestInnerLocalPkg {
public static void testStaticMethod() {
class Inner {
final String x;
public Inner(String var1) {
this.x = var1;// 24
}// 25
}
new Inner("test");// 27
new TestInnerLocalPkg.Inner1Static("test");// 28
new TestInnerLocalPkg.Inner1Static.Inner2Static("test");// 29
}// 30
public void testMethod() {
class Inner {
final String x;
public Inner(String var2) {
this.x = var2;// 36
}// 37
}
new Inner("test");// 39
new TestInnerLocalPkg.Inner1Static("test");// 40
new TestInnerLocalPkg.Inner1("test");// 41
new TestInnerLocalPkg.Inner1Static.Inner2Static("test");// 42
}// 43
static class Inner1Static {
final String x;
public Inner1Static(String var1) {
this.x = var1;// 55
}// 56
public static class Inner2Static {
final String x;
public Inner2Static(String var1) {
this.x = var1;// 61
}// 62
}
}
class Inner1 {
final String x;
public Inner1(String var2) {
this.x = var2;// 48
}// 49
}
}
class 'pkg/TestInnerLocalPkg$1Inner' {
method '<init> (Ljava/lang/String;)V' {
6 8
9 9
}
}
class 'pkg/TestInnerLocalPkg' {
method 'testStaticMethod ()V' {
4 12
e 13
18 14
1e 15
}
method 'testMethod ()V' {
5 26
f 27
1a 28
24 29
2a 30
}
}
class 'pkg/TestInnerLocalPkg$2Inner' {
method '<init> (Lpkg/TestInnerLocalPkg;Ljava/lang/String;)V' {
b 22
e 23
}
}
class 'pkg/TestInnerLocalPkg$Inner1Static' {
method '<init> (Ljava/lang/String;)V' {
6 36
9 37
}
}
class 'pkg/TestInnerLocalPkg$Inner1Static$Inner2Static' {
method '<init> (Ljava/lang/String;)V' {
6 43
9 44
}
}
class 'pkg/TestInnerLocalPkg$Inner1' {
method '<init> (Lpkg/TestInnerLocalPkg;Ljava/lang/String;)V' {
b 52
e 53
}
}
Lines mapping:
24 <-> 9
25 <-> 10
27 <-> 13
28 <-> 14
29 <-> 15
30 <-> 16
36 <-> 23
37 <-> 24
39 <-> 27
40 <-> 28
41 <-> 29
42 <-> 30
43 <-> 31
48 <-> 53
49 <-> 54
55 <-> 37
56 <-> 38
61 <-> 44
62 <-> 45
Not mapped:
23
35
47
54
60

@ -1,24 +1,26 @@
package pkg;
public class TestInnerSignature<A, B, C> { public class TestInnerSignature<A, B, C> {
A a; A a;
B b; B b;
C c; C c;
public TestInnerSignature(A var1, B var2, C var3) { public TestInnerSignature(A a, @Deprecated B b, C c) {
this.a = var1;// 23 this.a = a;// 9
this.b = var2;// 24 this.b = b;// 10
this.c = var3;// 25 this.c = c;// 11
}// 26 }// 12
public static class InnerStatic<A, B, C> { public static class InnerStatic<A, B, C> {
A a; A a;
B b; B b;
C c; C c;
public InnerStatic(A var1, B var2, C var3) { public InnerStatic(A a, @Deprecated B b, C c) {
this.a = var1;// 46 this.a = a;// 32
this.b = var2;// 47 this.b = b;// 33
this.c = var3;// 48 this.c = c;// 34
}// 49 }// 35
} }
public class Inner { public class Inner {
@ -26,55 +28,55 @@ public class TestInnerSignature<A, B, C> {
B b; B b;
C c; C c;
public Inner(A var2, B var3, C var4) { public Inner(A a, @Deprecated B b, C c) {
this.a = var2;// 34 this.a = a;// 20
this.b = var3;// 35 this.b = b;// 21
this.c = var4;// 36 this.c = c;// 22
}// 37 }// 23
} }
} }
class 'TestInnerSignature' { class 'pkg/TestInnerSignature' {
method '<init> (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { method '<init> (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' {
6 6 6 8
b 7 b 9
10 8 10 10
13 9 13 11
} }
} }
class 'TestInnerSignature$InnerStatic' { class 'pkg/TestInnerSignature$InnerStatic' {
method '<init> (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { method '<init> (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' {
6 17 6 19
b 18 b 20
10 19 10 21
13 20 13 22
} }
} }
class 'TestInnerSignature$Inner' { class 'pkg/TestInnerSignature$Inner' {
method '<init> (LTestInnerSignature;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' { method '<init> (Lpkg/TestInnerSignature;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V' {
b 29 b 31
10 30 10 32
16 31 16 33
19 32 19 34
} }
} }
Lines mapping: Lines mapping:
23 <-> 7 9 <-> 9
24 <-> 8 10 <-> 10
25 <-> 9 11 <-> 11
26 <-> 10 12 <-> 12
34 <-> 30 20 <-> 32
35 <-> 31 21 <-> 33
36 <-> 32 22 <-> 34
37 <-> 33 23 <-> 35
46 <-> 18 32 <-> 20
47 <-> 19 33 <-> 21
48 <-> 20 34 <-> 22
49 <-> 21 35 <-> 23
Not mapped: Not mapped:
22 8
33 19
45 31

@ -1,24 +1,10 @@
/* package pkg;
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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.
*/
public class TestInnerLocal { public class TestInnerLocal {
public static void testStaticMethod() { public static void testStaticMethod() {
class Inner { class Inner {
final String x; final String x;
public Inner(String x) { public Inner(@Deprecated String x) {
this.x = x; this.x = x;
} }
} }
@ -30,7 +16,7 @@ public class TestInnerLocal {
public void testMethod() { public void testMethod() {
class Inner { class Inner {
final String x; final String x;
public Inner(String x) { public Inner(@Deprecated String x) {
this.x = x; this.x = x;
} }
} }
@ -42,20 +28,20 @@ public class TestInnerLocal {
class Inner1 { class Inner1 {
final String x; final String x;
public Inner1(String x) { public Inner1(@Deprecated String x) {
this.x = x; this.x = x;
} }
} }
static class Inner1Static { static class Inner1Static {
final String x; final String x;
public Inner1Static(String x) { public Inner1Static(@Deprecated String x) {
this.x = x; this.x = x;
} }
public static class Inner2Static { public static class Inner2Static {
final String x; final String x;
public Inner2Static(String x) { public Inner2Static(@Deprecated String x) {
this.x = x; this.x = x;
} }
} }

@ -1,65 +0,0 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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 pkg;
public class TestInnerLocalPkg {
public static void testStaticMethod() {
class Inner {
final String x;
public Inner(String x) {
this.x = x;
}
}
new Inner("test");
new Inner1Static("test");
new Inner1Static.Inner2Static("test");
}
public void testMethod() {
class Inner {
final String x;
public Inner(String x) {
this.x = x;
}
}
new Inner("test");
new Inner1Static("test");
new Inner1("test");
new Inner1Static.Inner2Static("test");
}
class Inner1 {
final String x;
public Inner1(String x) {
this.x = x;
}
}
static class Inner1Static {
final String x;
public Inner1Static(String x) {
this.x = x;
}
public static class Inner2Static {
final String x;
public Inner2Static(String x) {
this.x = x;
}
}
}
}

@ -1,25 +1,11 @@
/* package pkg;
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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.
*/
public class TestInnerSignature<A,B,C> { public class TestInnerSignature<A,B,C> {
A a; A a;
B b; B b;
C c; C c;
public TestInnerSignature(A a,B b,C c) { public TestInnerSignature(A a, @Deprecated B b,C c) {
this.a = a; this.a = a;
this.b = b; this.b = b;
this.c = c; this.c = c;
@ -30,7 +16,7 @@ public class TestInnerSignature<A,B,C> {
B b; B b;
C c; C c;
public Inner(A a, B b, C c) { public Inner(A a, @Deprecated B b, C c) {
this.a = a; this.a = a;
this.b = b; this.b = b;
this.c = c; this.c = c;
@ -42,7 +28,7 @@ public class TestInnerSignature<A,B,C> {
B b; B b;
C c; C c;
public InnerStatic(A a, B b, C c) { public InnerStatic(A a, @Deprecated B b, C c) {
this.a = a; this.a = a;
this.b = b; this.b = b;
this.c = c; this.c = c;

Loading…
Cancel
Save