]> source.dussan.org Git - aspectj.git/commitdiff
245286: test and fix: ajdoc does not generate signature correctly for generic constructer
authoraclement <aclement>
Thu, 28 Aug 2008 02:18:27 +0000 (02:18 +0000)
committeraclement <aclement>
Thu, 28 Aug 2008 02:18:27 +0000 (02:18 +0000)
tests/bugs153/GenericMethod/C.java
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java

index 8621aca45b3865fe9dd85838d776ce332e39ac6f..01751d898a61592505b5e622914f93519eb1e276 100644 (file)
@@ -1,6 +1,9 @@
 import java.util.List;
 
 public class C {
+       public <T> C(T b){
+  }
+  
   public <T> T returnT(T a){
          return a;
   }
index 022bf79dea3d1a5d38883895703c48d052685831..21119d00a33f9e888801903f1d4c7beefca853dd 100644 (file)
@@ -11,8 +11,6 @@
 package org.aspectj.systemtest.ajc153;
 
 import java.io.File;
-import java.util.Iterator;
-import java.util.List;
 
 import junit.framework.Test;
 
@@ -108,8 +106,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
          // (2,3)=checkingIfShouldWeave,AcceptingResult for class
          // (4,5)=checkingIfShouldWeave,AcceptingResult for aspect
   }
-  public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
-  public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
+  public void testMatchVolatileField_pr150671() {runTest("match volatile field");}
+  public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");}
   public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
   
   public void testReweavableAspectNotRegistered_pr129525 () {
@@ -122,7 +120,7 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
   
   public void testNPEinFieldSignatureImpl_pr155972 () {
          runTest("NPE in FieldSignatureImpl");
-  }
+  } 
   
   public void testNPEinInitializerSignatureImpl_pr155972 () {
          runTest("NPE in InitializerSignatureImpl");
@@ -262,6 +260,14 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                assertEquals("expected source signature to be " + expected + 
                                " but found " + ipe.getSourceSignature(), 
                                expected, ipe.getSourceSignature());
+               
+               // Generic Method Constructor
+               ipe = top.findElementForLabel(top.getRoot(),
+                         IProgramElement.Kind.CONSTRUCTOR,"C(T)");
+                         expected = "public <T> C(T b)";
+                               assertEquals("expected source signature to be " + expected + 
+                                               " but found " + ipe.getSourceSignature(), 
+                                               expected, ipe.getSourceSignature());
   }