Lines 6520-6526
Link Here
|
6520 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6520 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6521 |
} |
6521 |
} |
6522 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 |
6522 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 |
6523 |
public void _testONLY_157() throws Exception { |
6523 |
public void test157() throws Exception { |
6524 |
this.runConformTest(new String[] { |
6524 |
this.runConformTest(new String[] { |
6525 |
"package1/A.java",//======================= |
6525 |
"package1/A.java",//======================= |
6526 |
"package package1;\n" + |
6526 |
"package package1;\n" + |
Lines 6550-6564
Link Here
|
6550 |
}, |
6550 |
}, |
6551 |
""); |
6551 |
""); |
6552 |
String expectedOutput = |
6552 |
String expectedOutput = |
6553 |
" // Method descriptor #33 (Lpackage2/C;)V\n" + |
6553 |
" // Method descriptor #33 (Lpackage2/C;)I\n" + |
6554 |
" // Stack: 1, Locals: 1\n" + |
6554 |
" // Stack: 1, Locals: 1\n" + |
6555 |
" static synthetic void access$0(package2.C arg0);\n" + |
6555 |
" static synthetic int access$0(package2.C arg0);\n" + |
6556 |
" 0 aload_0 [arg0]\n" + |
6556 |
" 0 aload_0 [arg0]\n" + |
6557 |
" 1 getfield package2.C.outerField : int"; |
6557 |
" 1 getfield package2.C.outerField : int"; |
6558 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6558 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6559 |
} |
6559 |
} |
6560 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6560 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6561 |
public void _testONLY_158() throws Exception { |
6561 |
public void test158() throws Exception { |
6562 |
this.runConformTest(new String[] { |
6562 |
this.runConformTest(new String[] { |
6563 |
"package1/A.java",//======================= |
6563 |
"package1/A.java",//======================= |
6564 |
"package package1;\n" + |
6564 |
"package package1;\n" + |
Lines 6598-6604
Link Here
|
6598 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6598 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6599 |
} |
6599 |
} |
6600 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6600 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6601 |
public void _testONLY_159() throws Exception { |
6601 |
public void test159() throws Exception { |
6602 |
this.runConformTest(new String[] { |
6602 |
this.runConformTest(new String[] { |
6603 |
"package1/A.java",//======================= |
6603 |
"package1/A.java",//======================= |
6604 |
"package package1;\n" + |
6604 |
"package package1;\n" + |
Lines 6628-6642
Link Here
|
6628 |
}, |
6628 |
}, |
6629 |
""); |
6629 |
""); |
6630 |
String expectedOutput = |
6630 |
String expectedOutput = |
6631 |
" // Method descriptor #33 (Lpackage2/C;)V\n" + |
6631 |
" // Method descriptor #33 (Lpackage2/C;)I\n" + |
6632 |
" // Stack: 1, Locals: 1\n" + |
6632 |
" // Stack: 1, Locals: 1\n" + |
6633 |
" static synthetic void access$0(package2.C arg0);\n" + |
6633 |
" static synthetic int access$0(package2.C arg0);\n" + |
6634 |
" 0 aload_0 [arg0]\n" + |
6634 |
" 0 aload_0 [arg0]\n" + |
6635 |
" 1 getfield package2.C.outerField : int"; |
6635 |
" 1 getfield package2.C.outerField : int"; |
6636 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6636 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6637 |
} |
6637 |
} |
6638 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6638 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6639 |
public void _testONLY_160() throws Exception { |
6639 |
public void test160() throws Exception { |
6640 |
this.runConformTest(new String[] { |
6640 |
this.runConformTest(new String[] { |
6641 |
"package1/A.java",//======================= |
6641 |
"package1/A.java",//======================= |
6642 |
"package package1;\n" + |
6642 |
"package package1;\n" + |
Lines 6674-6679
Link Here
|
6674 |
" 2 putfield package2.C.outerField : int"; |
6674 |
" 2 putfield package2.C.outerField : int"; |
6675 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6675 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6676 |
} |
6676 |
} |
|
|
6677 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6678 |
public void test161() throws Exception { |
6679 |
this.runConformTest(new String[] { |
6680 |
"package1/A.java",//======================= |
6681 |
"package package1;\n" + |
6682 |
"abstract class A {\n" + |
6683 |
" static protected int outerField; {\n" + |
6684 |
" }\n" + |
6685 |
"}\n", |
6686 |
"package1/B.java",//======================= |
6687 |
"package package1;\n" + |
6688 |
"public class B extends A {\n" + |
6689 |
"}\n", |
6690 |
"package2/C.java",//======================= |
6691 |
"package package2;\n" + |
6692 |
"import package1.B;\n" + |
6693 |
"public class C extends B {\n" + |
6694 |
" private final MyInner myInner = new MyInner();\n" + |
6695 |
" private class MyInner {\n" + |
6696 |
" public void innerMethod() {\n" + |
6697 |
" int j = C.this.outerField;\n" + |
6698 |
" }\n" + |
6699 |
" }\n" + |
6700 |
" public static void main(String[] args) {\n" + |
6701 |
" final C c = new C();\n" + |
6702 |
" c.myInner.innerMethod();\n" + |
6703 |
" }\n" + |
6704 |
"}\n", |
6705 |
}, |
6706 |
""); |
6707 |
String expectedOutput = |
6708 |
" // Method descriptor #33 ()I\n" + |
6709 |
" // Stack: 1, Locals: 0\n" + |
6710 |
" static synthetic int access$0();\n" + |
6711 |
" 0 getstatic package2.C.outerField : int"; |
6712 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6713 |
} |
6714 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6715 |
public void test162() throws Exception { |
6716 |
this.runConformTest(new String[] { |
6717 |
"package1/A.java",//======================= |
6718 |
"package package1;\n" + |
6719 |
"abstract class A {\n" + |
6720 |
" static protected int outerField; {\n" + |
6721 |
" }\n" + |
6722 |
"}\n", |
6723 |
"package1/B.java",//======================= |
6724 |
"package package1;\n" + |
6725 |
"public class B extends A {\n" + |
6726 |
"}\n", |
6727 |
"package2/C.java",//======================= |
6728 |
"package package2;\n" + |
6729 |
"import package1.B;\n" + |
6730 |
"public class C extends B {\n" + |
6731 |
" private final MyInner myInner = new MyInner();\n" + |
6732 |
" private class MyInner {\n" + |
6733 |
" public void innerMethod() {\n" + |
6734 |
" C.this.outerField = 12;\n" + |
6735 |
" }\n" + |
6736 |
" }\n" + |
6737 |
" public static void main(String[] args) {\n" + |
6738 |
" final C c = new C();\n" + |
6739 |
" c.myInner.innerMethod();\n" + |
6740 |
" }\n" + |
6741 |
"}\n", |
6742 |
}, |
6743 |
""); |
6744 |
String expectedOutput = |
6745 |
" // Method descriptor #33 (I)V\n" + |
6746 |
" // Stack: 1, Locals: 1\n" + |
6747 |
" static synthetic void access$0(int arg0);\n" + |
6748 |
" 0 iload_0 [arg0]\n" + |
6749 |
" 1 putstatic package2.C.outerField : int"; |
6750 |
|
6751 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6752 |
} |
6753 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6754 |
public void test163() throws Exception { |
6755 |
this.runConformTest(new String[] { |
6756 |
"package1/A.java",//======================= |
6757 |
"package package1;\n" + |
6758 |
"abstract class A {\n" + |
6759 |
" static protected int outerField; {\n" + |
6760 |
" }\n" + |
6761 |
"}\n", |
6762 |
"package1/B.java",//======================= |
6763 |
"package package1;\n" + |
6764 |
"public class B extends A {\n" + |
6765 |
"}\n", |
6766 |
"package2/C.java",//======================= |
6767 |
"package package2;\n" + |
6768 |
"import package1.B;\n" + |
6769 |
"public class C extends B {\n" + |
6770 |
" private final MyInner myInner = new MyInner();\n" + |
6771 |
" private class MyInner {\n" + |
6772 |
" public void innerMethod() {\n" + |
6773 |
" int j = outerField;\n" + |
6774 |
" }\n" + |
6775 |
" }\n" + |
6776 |
" public static void main(String[] args) {\n" + |
6777 |
" final C c = new C();\n" + |
6778 |
" c.myInner.innerMethod();\n" + |
6779 |
" }\n" + |
6780 |
"}\n", |
6781 |
}, |
6782 |
""); |
6783 |
String expectedOutput = |
6784 |
" // Method descriptor #33 ()I\n" + |
6785 |
" // Stack: 1, Locals: 0\n" + |
6786 |
" static synthetic int access$0();\n" + |
6787 |
" 0 getstatic package2.C.outerField : int"; |
6788 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6789 |
} |
6790 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation |
6791 |
public void test164() throws Exception { |
6792 |
this.runConformTest(new String[] { |
6793 |
"package1/A.java",//======================= |
6794 |
"package package1;\n" + |
6795 |
"abstract class A {\n" + |
6796 |
" static protected int outerField; {\n" + |
6797 |
" }\n" + |
6798 |
"}\n", |
6799 |
"package1/B.java",//======================= |
6800 |
"package package1;\n" + |
6801 |
"public class B extends A {\n" + |
6802 |
"}\n", |
6803 |
"package2/C.java",//======================= |
6804 |
"package package2;\n" + |
6805 |
"import package1.B;\n" + |
6806 |
"public class C extends B {\n" + |
6807 |
" private final MyInner myInner = new MyInner();\n" + |
6808 |
" private class MyInner {\n" + |
6809 |
" public void innerMethod() {\n" + |
6810 |
" outerField = 12;\n" + |
6811 |
" }\n" + |
6812 |
" }\n" + |
6813 |
" public static void main(String[] args) {\n" + |
6814 |
" final C c = new C();\n" + |
6815 |
" c.myInner.innerMethod();\n" + |
6816 |
" }\n" + |
6817 |
"}\n", |
6818 |
}, |
6819 |
""); |
6820 |
String expectedOutput = |
6821 |
" // Method descriptor #33 (I)V\n" + |
6822 |
" // Stack: 1, Locals: 1\n" + |
6823 |
" static synthetic void access$0(int arg0);\n" + |
6824 |
" 0 iload_0 [arg0]\n" + |
6825 |
" 1 putstatic package2.C.outerField : int"; |
6826 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6827 |
} |
6828 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=128563 - variation |
6829 |
public void test165() throws Exception { |
6830 |
this.runConformTest(new String[] { |
6831 |
"package1/A.java",//======================= |
6832 |
"package package1;\n" + |
6833 |
"abstract class A {\n" + |
6834 |
" static protected final void outerMethod() {\n" + |
6835 |
" }\n" + |
6836 |
"}\n", |
6837 |
"package1/B.java",//======================= |
6838 |
"package package1;\n" + |
6839 |
"public class B extends A {\n" + |
6840 |
"}\n", |
6841 |
"package2/C.java",//======================= |
6842 |
"package package2;\n" + |
6843 |
"import package1.B;\n" + |
6844 |
"public class C extends B {\n" + |
6845 |
" private final MyInner myInner = new MyInner();\n" + |
6846 |
" private class MyInner {\n" + |
6847 |
" public void innerMethod() {\n" + |
6848 |
" C.this.outerMethod();\n" + |
6849 |
" }\n" + |
6850 |
" }\n" + |
6851 |
" public static void main(String[] args) {\n" + |
6852 |
" final C c = new C();\n" + |
6853 |
" c.myInner.innerMethod();\n" + |
6854 |
" }\n" + |
6855 |
"}\n", |
6856 |
}, |
6857 |
""); |
6858 |
String expectedOutput = |
6859 |
" // Method descriptor #8 ()V\n" + |
6860 |
" // Stack: 0, Locals: 0\n" + |
6861 |
" static synthetic void access$0();\n" + |
6862 |
" 0 invokestatic package2.C.outerMethod() : void"; |
6863 |
checkDisassembledClassFile(OUTPUT_DIR + File.separator + "package2" + File.separator + "C.class", "C", expectedOutput); |
6864 |
} |
6865 |
|
6677 |
public static Class testClass() { |
6866 |
public static Class testClass() { |
6678 |
return InnerEmulationTest.class; |
6867 |
return InnerEmulationTest.class; |
6679 |
} |
6868 |
} |