]> source.dussan.org Git - aspectj.git/commitdiff
tests for 162135 (commented out) and 162657 (not commented out)
authoraclement <aclement>
Mon, 30 Oct 2006 10:25:24 +0000 (10:25 +0000)
committeraclement <aclement>
Mon, 30 Oct 2006 10:25:24 +0000 (10:25 +0000)
tests/bugs153/pr162657/TestAspect.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
tests/src/org/aspectj/systemtest/ajc153/ajc153.xml

diff --git a/tests/bugs153/pr162657/TestAspect.aj b/tests/bugs153/pr162657/TestAspect.aj
new file mode 100644 (file)
index 0000000..3b58ec8
--- /dev/null
@@ -0,0 +1,31 @@
+import java.util.List;
+
+public aspect TestAspect {
+       private pointcut inTest(): within(TestComp);
+       
+       private pointcut inAdd(BaseModel m): inTest() &&
+               execution(public BaseModel+ BaseComp+.add*(BaseModel+)) &&
+               args(m);
+       
+       private pointcut inGetSearchByObj(BaseModel m): inTest() &&
+               (execution(public * BaseComp+.get*(BaseModel+)) ||
+               execution(public * BaseComp+.search*(BaseModel+))) &&
+               args(m);
+
+       private pointcut inGrate():
+       (execution(public * BaseComp+.get*(BaseModel+)) ||
+       execution(public * BaseComp+.search*(BaseModel+)));
+       
+       private pointcut inUpdate(BaseModel m): inTest() &&
+               execution(public * BaseComp+.*(BaseModel+)) &&
+               args(m) && !inAdd(BaseModel) && !inGrate();
+       
+       before(BaseModel m): inUpdate(m) {      }
+}
+
+
+abstract class BaseComp { }
+abstract class BaseModel {}
+class TestComp {}
+
+
index 3790fcad6e6f87702f8ed89d6335a41aba65a6f7..cb515089e5fcb744c1dd7a9a2c4c79c2e3afca9e 100644 (file)
@@ -28,6 +28,12 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
   // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
   // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
 //  public void testNegatedAnnotationMatchingProblem_pr153464() { runTest("negated annotation matching problem");}
+//  public void testAnnotationStyleBcException_pr162135() { runTest("bcexception in annotation style around advice");}
+//  public void testAnnotationStyleBcException_pr162135_2() { runTest("bcexception in annotation style around advice - 2");}
+//  public void testAnnotationStyleBcException_pr162135_3() { runTest("bcexception in annotation style around advice - 3");}
+//  public void testAnnotationStyleBcException_pr162135_4() { runTest("bcexception in annotation style around advice - 4");}
+//  public void testAnnotationStyleBcException_pr162135_5() { runTest("bcexception in annotation style around advice - 5");}
+  public void testComplexPointcut_pr162657() { runTest("complex pointcut");}
   public void testGenericsInPointcuts_pr161502() { runTest("generics in pointcuts");}
   public void testGenericsInPointcuts_pr161502_2() { runTest("generics in pointcuts - 2");}
   public void testNoNPEDueToMissingType_pr149908() { runTest("ensure no npe due to missing type");}
index ee379452dbeaafc7d86e21fe04924df071b18dfe..85219fc093a7b3bd8514b7ffc5bfdb6c4d850978 100644 (file)
                <message kind="warning" text="can not resolve this member: append [Xlint:unresolvableMember]"/>
          </compile>
     </ajc-test>
+
+    <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice">
+      <compile files="Foo.java" options="-1.5"/>
+      <run class="Foo"/>
+    </ajc-test>
+
+    <ajc-test dir="bugs153/pr162657" title="complex pointcut">
+      <compile files="TestAspect.aj"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 2">
+      <compile files="Foo2.java" options="-1.5"/>
+      <run class="Foo2"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 3">
+      <compile files="Foo3.java" options="-1.5"/>
+      <run class="Foo3"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 4">
+      <compile files="Foo4.java" options="-1.5"/>
+      <run class="Foo4"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 5">
+      <compile files="Foo5.java" options="-1.5"/>
+      <run class="Foo5"/>
+    </ajc-test>
     
      <ajc-test dir="bugs153/pr159143" title="declare method annotations">
         <compile files="DeclareMethodAnnotation.java" options="-1.5">