]> source.dussan.org Git - aspectj.git/commitdiff
tests for pr104220 - poor toString implementations for adviceexecution join points.
authoracolyer <acolyer>
Tue, 8 Nov 2005 18:16:25 +0000 (18:16 +0000)
committeracolyer <acolyer>
Tue, 8 Nov 2005 18:16:25 +0000 (18:16 +0000)
tests/bugs150/Pr104220.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml

diff --git a/tests/bugs150/Pr104220.aj b/tests/bugs150/Pr104220.aj
new file mode 100644 (file)
index 0000000..a488613
--- /dev/null
@@ -0,0 +1,29 @@
+// pr104220 - adviceexecution joinpoint toString forms
+
+public aspect Pr104220 {
+       
+       before() : adviceexecution() && !within(Pr104220) {
+               System.out.println(thisJoinPoint.getKind());
+               System.out.println(thisJoinPoint.toString());
+               System.out.println(thisJoinPoint.toShortString());
+               System.out.println(thisJoinPoint.toLongString());
+       }
+
+       public static void main(String[] args) {
+               new C().foo();
+       }
+       
+}
+
+class C {
+       
+       public void foo() {}
+       
+}
+
+aspect SomeAspect {
+       
+       before() : execution(* foo(..)) {}
+       
+}
+
index 3f7d593b22d0d4583172e10f9cfb285d49ee86e4..ce90c37a26c92fbb35e9821ff23a74f60c7b75f8 100644 (file)
@@ -674,6 +674,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
          runTest("Anonymous types and nome matching");
   }
   
+  public void testAdviceExecutionJPToStringForms() {
+         runTest("adviceexecution join point toString forms");
+  }
+  
   // helper methods.....
   
   public SyntheticRepository createRepos(File cpentry) {
index ea79220811f215eec1f8b8d963247c87a6dbf0a5..02ad64b6bc733641b3381d1ac126b0ec78dbfee9 100644 (file)
       </run>
     </ajc-test>
     
+    <ajc-test dir="bugs150" pr="104220" title="adviceexecution join point toString forms">
+      <compile files="Pr104220.aj"/>
+      <run class="Pr104220">
+        <stdout>
+          <line text="adviceexecution"/>
+          <line text="adviceexecution(void SomeAspect.before())"/>
+          <line text="adviceexecution(SomeAspect.before())"/>
+          <line text="adviceexecution(void SomeAspect.before())"/>
+        </stdout>
+      </run>
+    </ajc-test>
+    
     <ajc-test dir="bugs150/pr113066" title="possible static imports bug - 1">
         <compile files="Consts.java,TestNPE.java" options="-1.5"/>
     </ajc-test>