]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 125699 and 125810 from matthew. test for 125699 commented out.
authoraclement <aclement>
Wed, 1 Feb 2006 15:20:37 +0000 (15:20 +0000)
committeraclement <aclement>
Wed, 1 Feb 2006 15:20:37 +0000 (15:20 +0000)
tests/bugs151/pr125699/AtTestTracing.java [new file with mode: 0644]
tests/bugs151/pr125699/TestTracing.aj [new file with mode: 0644]
tests/bugs151/pr125699/Tracing.aj [new file with mode: 0644]
tests/bugs151/pr125810/SubAspect.aj [new file with mode: 0644]
tests/bugs151/pr125810/SubAtAspect.java [new file with mode: 0644]
tests/bugs151/pr125810/SuperAspect.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java
tests/src/org/aspectj/systemtest/ajc151/ajc151.xml

diff --git a/tests/bugs151/pr125699/AtTestTracing.java b/tests/bugs151/pr125699/AtTestTracing.java
new file mode 100644 (file)
index 0000000..32d380f
--- /dev/null
@@ -0,0 +1,7 @@
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
+@Aspect
+public class AtTestTracing extends Tracing {
+
+}
diff --git a/tests/bugs151/pr125699/TestTracing.aj b/tests/bugs151/pr125699/TestTracing.aj
new file mode 100644 (file)
index 0000000..1de7054
--- /dev/null
@@ -0,0 +1,2 @@
+public aspect TestTracing extends Tracing {
+}
diff --git a/tests/bugs151/pr125699/Tracing.aj b/tests/bugs151/pr125699/Tracing.aj
new file mode 100644 (file)
index 0000000..bff3a81
--- /dev/null
@@ -0,0 +1,16 @@
+public abstract aspect Tracing {
+       
+       before (Object obj) : execution(* *(..)) && this(obj) {
+               System.out.println(thisJoinPoint);
+       }
+       
+//     before (Object obj) : execution(* *(..)) && this(obj) {
+       before () : execution(* *(..)) {
+               System.out.println(thisJoinPointStaticPart);
+       }
+       
+//     before (Object obj) : execution(* *(..)) && this(obj) {
+       before () : execution(* *(..)) && this(Object) {
+               System.out.println(thisEnclosingJoinPointStaticPart);
+       }
+}
diff --git a/tests/bugs151/pr125810/SubAspect.aj b/tests/bugs151/pr125810/SubAspect.aj
new file mode 100644 (file)
index 0000000..9a3a964
--- /dev/null
@@ -0,0 +1,5 @@
+public aspect SubAspect extends SuperAspect {
+
+//     protected pointcut scope();
+
+}
diff --git a/tests/bugs151/pr125810/SubAtAspect.java b/tests/bugs151/pr125810/SubAtAspect.java
new file mode 100644 (file)
index 0000000..78e85b5
--- /dev/null
@@ -0,0 +1,6 @@
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public class SubAtAspect extends SuperAspect {
+
+}
diff --git a/tests/bugs151/pr125810/SuperAspect.aj b/tests/bugs151/pr125810/SuperAspect.aj
new file mode 100644 (file)
index 0000000..1f34881
--- /dev/null
@@ -0,0 +1,4 @@
+public abstract aspect SuperAspect {
+
+       protected abstract pointcut scope ();
+}
index 36b036da4a56ca204d7333af588797cf12a02484..d47e36d8f6977a971f2a7e7fb6b945e103d6eb73 100644 (file)
@@ -71,6 +71,17 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
          assertFalse("printParameters method should have arguments",pe2.getParameterTypes().isEmpty());          
   }
   
+  /*
+   * @AspectJ bugs and enhancements
+   */
+//  public void testAtAspectInheritsAdviceWithTJPAndThis_pr125699 () {
+//       runTest("inherit adivce with this() and thisJoinPoint"); 
+//  }
+  
+  public void testAtAspectInheritsAbstractPointcut_pr125810 () {
+         runTest("warning when inherited pointcut not made concrete"); 
+  }
+  
   /*
    * Load-time weaving bugs and enhancements
    */
index 99c2698d1f5d8b9778604a3b1f1673a3203fa508..7d5a966c2b8dd09f2c7fb5b791165c00cc184677 100644 (file)
         <compile files="AbstractMethods.aj, ConcreteMethods.aj"/>
         <run class="HelloWorld" ltw="aop-tracing.xml"/>
     </ajc-test>
+    
+    <ajc-test dir="bugs151/pr125699" title="inherit adivce with this() and thisJoinPoint">
+        <compile files="Tracing.aj, TestTracing.aj, AtTestTracing.java" options="-1.5"/>
+    </ajc-test>
+    
+    <ajc-test dir="bugs151/pr125810" title="warning when inherited pointcut not made concrete">
+        <compile files="SuperAspect.aj, SubAspect.aj, SubAtAspect.java" options="-1.5">
+          <message kind="error" line="3" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAspect"/>
+          <message kind="error" line="1" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAspect"/>
+          <message kind="error" line="3" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAtAspect"/>
+          <message kind="error" line="4" text="inherited abstract pointcut SuperAspect.scope() is not made concrete in SubAtAspect"/>
+        </compile>
+    </ajc-test>
 
     
     <!-- New features down here... when they arent big enough to have their own test file -->