]> source.dussan.org Git - aspectj.git/commitdiff
test for 123553
authorwisberg <wisberg>
Fri, 17 Feb 2006 19:41:52 +0000 (19:41 +0000)
committerwisberg <wisberg>
Fri, 17 Feb 2006 19:41:52 +0000 (19:41 +0000)
tests/bugs151/pr123553/A.java [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/pr123553/A.java b/tests/bugs151/pr123553/A.java
new file mode 100644 (file)
index 0000000..fae646b
--- /dev/null
@@ -0,0 +1,19 @@
+
+public class A {
+    static Object s;
+    public static void main(String[] args) {
+        String t = "Hello, World!";
+        t.toString();
+        if (s != t) throw new Error();
+    }
+    static abstract aspect GenericAspect<T> {
+        abstract pointcut checkpoint(T t);
+
+        // advice declaration causes error
+        after(T t): checkpoint(t) { s = t;}
+    }
+    static aspect AAA extends GenericAspect<String>{
+        pointcut checkpoint(String s) : target(s) && 
+            call(String String.toString());
+    }  
+}
index 95a24601330c45ebbc20f9a4ce0535f4baa14d58..11af510548af87b217da32f1ae486ceddb29b5d2 100644 (file)
@@ -23,7 +23,8 @@ import org.aspectj.systemtest.ajc150.GenericsTests;
 import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
-         
+    
+  public void testGenericAdviceParameters_pr123553()    { runTest("generic advice parameters");}
   public void testMemberTypesInGenericTypes_pr122458()    { runTest("member types in generic types");}
   public void testMemberTypesInGenericTypes_pr122458_2()  { runTest("member types in generic types - 2");}
   public void testNPEOnDeclareAnnotation_pr123695() { runTest("Internal nullptr exception with complex declare annotation");}
index c470c67bf16ed42d1c6268eca5427d896a684be5..dfbcc1b737f9e7b9ff40424903a3d2d95c19efed 100644 (file)
@@ -3,6 +3,11 @@
 <!-- AspectJ v1.5.1 Tests -->
 <suite>
     
+    <ajc-test dir="bugs151/pr123553" title="generic advice parameters">
+        <compile files="A.java" options="-1.5"/>
+        <run class="A"/>
+    </ajc-test>  
+    
     <ajc-test dir="bugs151" title="member types in generic types">
         <compile files="pr122458.aj" options="-1.5 -emacssym"/>
     </ajc-test>