diff --git a/test/org/jetbrains/java/decompiler/SingleClassesTest.java b/test/org/jetbrains/java/decompiler/SingleClassesTest.java index fdaa6d0..0423ec6 100644 --- a/test/org/jetbrains/java/decompiler/SingleClassesTest.java +++ b/test/org/jetbrains/java/decompiler/SingleClassesTest.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"); } diff --git a/testData/classes/pkg/TestInner2$1.class b/testData/classes/pkg/TestInner2$1.class new file mode 100644 index 0000000..1f346fa Binary files /dev/null and b/testData/classes/pkg/TestInner2$1.class differ diff --git a/testData/classes/pkg/TestInner2$Another.class b/testData/classes/pkg/TestInner2$Another.class new file mode 100644 index 0000000..bd04605 Binary files /dev/null and b/testData/classes/pkg/TestInner2$Another.class differ diff --git a/testData/classes/pkg/TestInner2$Another2.class b/testData/classes/pkg/TestInner2$Another2.class new file mode 100644 index 0000000..ff02baa Binary files /dev/null and b/testData/classes/pkg/TestInner2$Another2.class differ diff --git a/testData/classes/pkg/TestInner2$AnotherStatic.class b/testData/classes/pkg/TestInner2$AnotherStatic.class new file mode 100644 index 0000000..1dec610 Binary files /dev/null and b/testData/classes/pkg/TestInner2$AnotherStatic.class differ diff --git a/testData/classes/pkg/TestInner2$AnotherStatic2.class b/testData/classes/pkg/TestInner2$AnotherStatic2.class new file mode 100644 index 0000000..3e4547a Binary files /dev/null and b/testData/classes/pkg/TestInner2$AnotherStatic2.class differ diff --git a/testData/classes/pkg/TestInner2.class b/testData/classes/pkg/TestInner2.class new file mode 100644 index 0000000..6b45de1 Binary files /dev/null and b/testData/classes/pkg/TestInner2.class differ diff --git a/testData/results/TestInner2.dec b/testData/results/TestInner2.dec new file mode 100644 index 0000000..2bc40f9 --- /dev/null +++ b/testData/results/TestInner2.dec @@ -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 ' ()V' { + 4 4 + } + + method ' (I)V' { + 4 7 + } +} + +class 'pkg/TestInner2$AnotherStatic2' { + method ' ()V' { + 1 11 + 2 11 + 3 11 + 6 12 + } +} + +class 'pkg/TestInner2$Another2' { + method ' (Lpkg/TestInner2;)V' { + 6 17 + 7 17 + 8 17 + b 18 + } +} + +class 'pkg/TestInner2$AnotherStatic' { + method ' ()V' { + 1 23 + 2 23 + 5 24 + } +} + +class 'pkg/TestInner2$Another' { + method ' (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 diff --git a/testData/src/pkg/TestInner2.java b/testData/src/pkg/TestInner2.java new file mode 100644 index 0000000..da402b9 --- /dev/null +++ b/testData/src/pkg/TestInner2.java @@ -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); + } + } +}