test for class extending a class with a private constructor

master
Egor.Ushakov 7 years ago
parent 8c440e281c
commit d40f673689
  1. 1
      test/org/jetbrains/java/decompiler/SingleClassesTest.java
  2. BIN
      testData/classes/pkg/TestInner2$1.class
  3. BIN
      testData/classes/pkg/TestInner2$Another.class
  4. BIN
      testData/classes/pkg/TestInner2$Another2.class
  5. BIN
      testData/classes/pkg/TestInner2$AnotherStatic.class
  6. BIN
      testData/classes/pkg/TestInner2$AnotherStatic2.class
  7. BIN
      testData/classes/pkg/TestInner2.class
  8. 89
      testData/results/TestInner2.dec
  9. 28
      testData/src/pkg/TestInner2.java

@ -66,6 +66,7 @@ public class SingleClassesTest {
@Test public void testAnonymousClassConstructor() { doTest("pkg/TestAnonymousClassConstructor"); }
@Test public void testInnerClassConstructor() { doTest("pkg/TestInnerClassConstructor"); }
@Test public void testInnerClassConstructor11() { doTest("v11/TestInnerClassConstructor"); }
//@Test public void testInnerClassConstructor2() { doTest("pkg/TestInner2"); } //TODO: fix
@Test public void testTryCatchFinally() { doTest("pkg/TestTryCatchFinally"); }
@Test public void testAmbiguousCall() { doTest("pkg/TestAmbiguousCall"); }
@Test public void testAmbiguousCallWithDebugInfo() { doTest("pkg/TestAmbiguousCallWithDebugInfo"); }

@ -0,0 +1,89 @@
package pkg;
class TestInner2 {
private TestInner2() {
}// 4
private TestInner2(int a) {
}// 5
static class AnotherStatic2 extends TestInner2 {
AnotherStatic2() {
super(2);// 25
}// 26
}
class Another2 extends TestInner2 {
Another2() {
super(2);// 19
}// 20
}
static class AnotherStatic extends TestInner2 {
AnotherStatic() {
}// 14
}
class Another extends TestInner2 {
Another() {
}// 9
}
}
class 'pkg/TestInner2' {
method '<init> ()V' {
4 4
}
method '<init> (I)V' {
4 7
}
}
class 'pkg/TestInner2$AnotherStatic2' {
method '<init> ()V' {
1 11
2 11
3 11
6 12
}
}
class 'pkg/TestInner2$Another2' {
method '<init> (Lpkg/TestInner2;)V' {
6 17
7 17
8 17
b 18
}
}
class 'pkg/TestInner2$AnotherStatic' {
method '<init> ()V' {
1 23
2 23
5 24
}
}
class 'pkg/TestInner2$Another' {
method '<init> (Lpkg/TestInner2;)V' {
6 29
7 29
a 30
}
}
Lines mapping:
4 <-> 5
5 <-> 8
8 <-> 30
9 <-> 31
13 <-> 24
14 <-> 25
19 <-> 18
20 <-> 19
25 <-> 12
26 <-> 13
Not mapped:
18

@ -0,0 +1,28 @@
package pkg;
class TestInner2 {
private TestInner2() {}
private TestInner2(int a) {}
class Another extends TestInner2 {
Another() {
}
}
static class AnotherStatic extends TestInner2 {
AnotherStatic() {
}
}
class Another2 extends TestInner2 {
Another2() {
super(2);
}
}
static class AnotherStatic2 extends TestInner2 {
AnotherStatic2() {
super(2);
}
}
}
Loading…
Cancel
Save