758 iFld = 3;
759 lFld = 4L;
760 fFld = 5.0f;
761 dFld = 6.0;
762 }
763
764 @Test
765 @IR(counts = {IRNode.STORE, "2", IRNode.STORE_I, "1", IRNode.STORE_L, "1",
766 IRNode.STORE_OF_CLASS, "GoodCount", "1", IRNode.STORE_L_OF_CLASS, "GoodCount", "1",
767 IRNode.STORE_OF_CLASS, "ir_framework/tests/MyClass", "1",
768 IRNode.STORE_I_OF_CLASS, "ir_framework/tests/MyClass", "1",
769 IRNode.STORE_OF_CLASS, "ir_framework/tests/GoodCount", "1",
770 IRNode.STORE_L_OF_CLASS, "ir_framework/tests/GoodCount", "1",
771 IRNode.STORE_OF_FIELD, "x", "2"})
772 public void good5() {
773 x = 3; // long
774 myClass.x = 4; // int
775 }
776
777 @Test
778 @IR(counts = {IRNode.STORE_OF_FIELD, "myClassEmpty", "1", IRNode.STORE_OF_CLASS, "GoodCount", "1",
779 IRNode.STORE_OF_CLASS, "/GoodCount", "1", IRNode.STORE_OF_CLASS, "MyClassEmpty", "0"},
780 failOn = {IRNode.STORE_OF_CLASS, "MyClassEmpty"})
781 public void good6() {
782 myClassEmpty = new MyClassEmpty();
783 }
784
785 @Test
786 @IR(counts = {IRNode.STORE_OF_FIELD, "iFld", "3", IRNode.STORE_OF_CLASS, "GoodCount", "0",
787 IRNode.STORE_OF_CLASS, "MyClass", "2", IRNode.STORE_OF_CLASS, "MyClassSub", "1",
788 IRNode.STORE, "3"},
789 failOn = {IRNode.STORE_OF_CLASS, "GoodCount"})
790 public void good7() {
791 myClass.iFld = 1;
792 myClassSubPoly.iFld = 2;
793 myClassSub.iFld = 3;
794 }
795
796 @Test
797 @IR(counts = {IRNode.LOAD, "1", IRNode.STORE, "1"})
798 public void good8() {
799 result = iFld;
|
758 iFld = 3;
759 lFld = 4L;
760 fFld = 5.0f;
761 dFld = 6.0;
762 }
763
764 @Test
765 @IR(counts = {IRNode.STORE, "2", IRNode.STORE_I, "1", IRNode.STORE_L, "1",
766 IRNode.STORE_OF_CLASS, "GoodCount", "1", IRNode.STORE_L_OF_CLASS, "GoodCount", "1",
767 IRNode.STORE_OF_CLASS, "ir_framework/tests/MyClass", "1",
768 IRNode.STORE_I_OF_CLASS, "ir_framework/tests/MyClass", "1",
769 IRNode.STORE_OF_CLASS, "ir_framework/tests/GoodCount", "1",
770 IRNode.STORE_L_OF_CLASS, "ir_framework/tests/GoodCount", "1",
771 IRNode.STORE_OF_FIELD, "x", "2"})
772 public void good5() {
773 x = 3; // long
774 myClass.x = 4; // int
775 }
776
777 @Test
778 @IR(counts = {
779 IRNode.STORE_OF_FIELD, "myClassEmpty", "1",
780 IRNode.STORE_OF_CLASS, "oodCount", "0",
781 IRNode.STORE_OF_CLASS, "GoodCount", "1",
782 IRNode.STORE_OF_CLASS, "/GoodCount", "1",
783 IRNode.STORE_OF_CLASS, "tests/GoodCount", "1",
784 IRNode.STORE_OF_CLASS, "/tests/GoodCount", "1",
785 IRNode.STORE_OF_CLASS, "ir_framework/tests/GoodCount", "1",
786 IRNode.STORE_OF_CLASS, "/ir_framework/tests/GoodCount", "0",
787 IRNode.STORE_OF_CLASS, "MyClassEmpty", "0"
788 },
789 failOn = {IRNode.STORE_OF_CLASS, "MyClassEmpty"})
790 public void good6() {
791 myClassEmpty = new MyClassEmpty();
792 }
793
794 @Test
795 @IR(counts = {IRNode.STORE_OF_FIELD, "iFld", "3", IRNode.STORE_OF_CLASS, "GoodCount", "0",
796 IRNode.STORE_OF_CLASS, "MyClass", "2", IRNode.STORE_OF_CLASS, "MyClassSub", "1",
797 IRNode.STORE, "3"},
798 failOn = {IRNode.STORE_OF_CLASS, "GoodCount"})
799 public void good7() {
800 myClass.iFld = 1;
801 myClassSubPoly.iFld = 2;
802 myClassSub.iFld = 3;
803 }
804
805 @Test
806 @IR(counts = {IRNode.LOAD, "1", IRNode.STORE, "1"})
807 public void good8() {
808 result = iFld;
|