]> source.dussan.org Git - aspectj.git/commitdiff
Tests for 209019 and fix: incorrect application of around advice when atAspectJ subaspect
authoraclement <aclement>
Wed, 7 Nov 2007 14:56:35 +0000 (14:56 +0000)
committeraclement <aclement>
Wed, 7 Nov 2007 14:56:35 +0000 (14:56 +0000)
tests/src/org/aspectj/systemtest/ajc154/Ajc154Tests.java
tests/src/org/aspectj/systemtest/ajc154/ajc154.xml

index 0ba9571f0cf3a38b040b9544d8c171bb8bf1c813..bb2691711051bcebf9fab25fd8fef16baa95519b 100644 (file)
@@ -45,6 +45,12 @@ public class Ajc154Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 //             runTest("new pointcut designators in a reference pointcut");
 //     }
 
+       //public void testDecpProblemWhenTargetAlreadyImplements_pr169432() { runTest("declare parents problem when target already implements interface");}
+       
+       public void testVariousLtwAroundProblems_pr209019_1() { runTest("various issues with ltw and around advice - 1"); }
+       public void testVariousLtwAroundProblems_pr209019_2() { runTest("various issues with ltw and around advice - 2"); }
+       public void testVariousLtwAroundProblems_pr209019_3() { runTest("various issues with ltw and around advice - 3"); }
+       public void testVariousLtwAroundProblems_pr209019_4() { runTest("various issues with ltw and around advice - 4"); }
        public void testAbstractAnnotationStylePointcutWithContext_pr202088() { runTest("abstract annotation style pointcut with context");}
        public void testNoErrorForAtDecpInNormalClass_pr169428() { runTest( "no error for atDecp in normal class");}
 
index a7c831c34ba43e8a4237250fbec09a096c7b62ed..b929a8200684048f269ad534364aa2d16e87ac07 100644 (file)
@@ -2,7 +2,67 @@
 
 <!-- AspectJ v1.6.0 Tests -->
 <suite>
- <ajc-test dir="bugs154/pr202088" title="abstract annotation style pointcut with context">
+
+   <!-- very basic with all code style, should be fine -->
+   <ajc-test dir="bugs154/pr209019/case1" title="various issues with ltw and around advice - 1">
+     <compile options="-1.5" files="A.java,DurationMethod.java,AbstractDurationMethod.java,Runner.java"/>
+     <run class="Runner">
+       <stdout>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m3())"/>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m2())"/>
+       </stdout>
+     </run>
+   </ajc-test>
+   
+   <!-- switch from code style sub-aspect to annotation style sub aspect -->
+   <ajc-test dir="bugs154/pr209019/case2" title="various issues with ltw and around advice - 2">
+     <compile options="-1.5 -XnoInline" files="A.java,AtDurationMethod.java,AbstractDurationMethod.java,Runner.java"/>
+     <run class="Runner">
+       <stdout>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m3())"/>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m2())"/>
+       </stdout>
+       <stderr>
+       </stderr>
+     </run>
+   </ajc-test>
+   
+   <!-- same as case2 but without -XnoInline -->
+   <ajc-test dir="bugs154/pr209019/case2" title="various issues with ltw and around advice - 3">
+     <compile options="-1.5" files="A.java,AtDurationMethod.java,AbstractDurationMethod.java,Runner.java"/>
+     <run class="Runner">
+       <stdout>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m3())"/>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m2())"/>
+       </stdout>
+       <stderr>
+       </stderr>
+     </run>
+   </ajc-test>
+   
+   <!-- now loadtime weaving -->
+   <ajc-test dir="bugs154/pr209019/case3" title="various issues with ltw and around advice - 4">
+     <compile options="-1.5" files="A.java,AbstractDurationMethod.java,Runner.java"/>
+     <run class="Runner" ltw="aop.xml">
+       <stdout>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m3())"/>
+         <line text="Proceeded at joinpoint call(Object a.b.A.m2())"/>
+       </stdout>
+       <stderr>
+       </stderr>
+     </run>
+   </ajc-test>
+   
+   
+
+
+   <ajc-test dir="bugs154/pr169432" title="declare parents problem when target already implements interface">
+     <compile options="-1.5" files="NonMarkerInterface.java,ClassThatAlreadyIncludesRequiredMethods.java,DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java"/>
+   </ajc-test>
+   
+
+
+   <ajc-test dir="bugs154/pr202088" title="abstract annotation style pointcut with context">
      <compile options="-1.5" files="Bug.java"/>
      <compile options="-1.5" files="Bug2.java">
      </compile>