]> source.dussan.org Git - aspectj.git/commitdiff
219419: test and fix
authoraclement <aclement>
Fri, 5 Dec 2008 22:00:38 +0000 (22:00 +0000)
committeraclement <aclement>
Fri, 5 Dec 2008 22:00:38 +0000 (22:00 +0000)
tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
tests/src/org/aspectj/systemtest/ajc163/ajc163.xml

index a461b9263e35893f7f0c8f6cc32826553354e887..1f33e5792944cafb6c8647b070a38276383b1156 100644 (file)
@@ -32,6 +32,32 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        // runTest("ataspectj decp");
        // }
 
+       public void testIncorrectArgOrdering_pr219419() {
+               runTest("incorrect arg ordering anno style");
+       }
+
+       public void testIncorrectArgOrdering_pr219419_2() {
+               runTest("incorrect arg ordering anno style - 2");
+       }
+
+       public void testIncorrectArgOrdering_pr219419_3() {
+               runTest("incorrect arg ordering anno style - 3");
+       }
+
+       // similar to 3 but parameters other way round
+       public void testIncorrectArgOrdering_pr219419_4() {
+               runTest("incorrect arg ordering anno style - 4");
+       }
+
+       // similar to 3 but also JoinPoint passed into advice
+       public void testIncorrectArgOrdering_pr219419_5() {
+               runTest("incorrect arg ordering anno style - 5");
+       }
+
+       // public void testDecpAnnoStyle_pr257754() {
+       // runTest("decp anno style");
+       // }
+
        public void testPoorAtAjIfMessage_pr256458() {
                runTest("poor ataj if message - 1");
        }
@@ -39,15 +65,12 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        public void testPoorAtAjIfMessage_pr256458_2() {
                runTest("poor ataj if message - 2");
        }
-/*
-       public void testInheritedAnnotations_pr128664() {
-               runTest("inherited annotations");
-       }
 
-       public void testInheritedAnnotations_pr128664_2() {
-               runTest("inherited annotations - 2");
-       }
-*/
+       /*
+        * public void testInheritedAnnotations_pr128664() { runTest("inherited annotations"); }
+        * 
+        * public void testInheritedAnnotations_pr128664_2() { runTest("inherited annotations - 2"); }
+        */
        public void testGetMethodNull_pr154427() {
                runTest("getMethod returning null");
        }
@@ -98,6 +121,10 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                IProgramElement itd = findElementAtLine(top.getRoot(), 10);
                String type = itd.getCorrespondingType(true);
                assertEquals("java.util.List<java.lang.String>", type);
+
+               itd = findElementAtLine(top.getRoot(), 16);
+               type = itd.getCorrespondingType(true);
+               assertEquals("java.util.List<java.lang.String>", type);
        }
 
        private IProgramElement findElementAtLine(IProgramElement whereToLook, int line) {
index 11c89c64f09f2a1ea581cce691b1833906ededcc..7a07dff4ad679723997a0cc57c1a463c07f4d184 100644 (file)
          <run class="Bug2"/>
     </ajc-test>
     
+    <ajc-test dir="bugs163/pr257754" title="decp anno style">
+         <compile files="Main.java" options="-1.5"/>
+         <run class="example.Main"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style">
+         <compile files="Code.java" options="-1.5"/>
+         <run class="Code">
+           <stdout>
+           <line text="Catching mess. Argument was ewwww"/>
+           </stdout>
+         </run>
+    </ajc-test>
+    
+    <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 2">
+         <compile files="Code2.java" options="-1.5"/>
+         <run class="Code2">
+           <stdout>
+           <line text="Catching mess. Argument was ewwww"/>
+           </stdout>
+         </run>
+    </ajc-test>
+    
+    <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 3">
+         <compile files="Code3.java" options="-1.5"/>
+         <run class="Code3">
+           <stdout>
+           <line text="afterReturningCreateBean advice input='s' ret=37"/>
+           <line text="Code3.main returned from call to createBean 37"/>
+           </stdout>
+         </run>
+    </ajc-test>
+    
+    <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 4">
+         <compile files="Code4.java" options="-1.5"/>
+         <run class="Code4">
+           <stdout>
+           <line text="afterReturningCreateBean advice input='s' ret=37"/>
+           <line text="Code4.main returned from call to createBean 37"/>
+           </stdout>
+         </run>
+    </ajc-test>
+    
+    <ajc-test dir="bugs163/pr219419" title="incorrect arg ordering anno style - 5">
+         <compile files="Code5.java" options="-1.5"/>
+         <run class="Code5">
+           <stdout>
+           <line text="afterReturningCreateBean advice input='s' ret=37"/>
+           <line text="Code5.main returned from call to createBean 37"/>
+           </stdout>
+         </run>
+    </ajc-test>
+    
+    
+    
     <ajc-test dir="bugs163/pr256458" title="poor ataj if message - 1">
          <compile files="Code.java" options="-1.5">
            <message kind="error" text="in annotation style, if(...) pointcuts cannot contain code"/>