]> source.dussan.org Git - aspectj.git/commitdiff
164356: test and fix: ajdoc
authoraclement <aclement>
Thu, 20 Mar 2008 00:12:27 +0000 (00:12 +0000)
committeraclement <aclement>
Thu, 20 Mar 2008 00:12:27 +0000 (00:12 +0000)
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
tests/src/org/aspectj/systemtest/ajc153/ajc153.xml

index c21fd252f629fe1168395f57a2837724bcffd0bf..4393ba98d8fc0c77d86843e273365805725790a2 100644 (file)
@@ -179,6 +179,27 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
   public void testNoNPEWithThrownExceptionWarningAndAtAspectj_pr161217() {runTest("NPE with thrown exception warning and at aspectj");}
   
+  public void testJavadocCommentsAreSetIfHaveNormalComments_pr164340() {
+         runTest("javadoc comments are set if have normal comments");
+         IHierarchy top = AsmManager.getDefault().getHierarchy();
+         
+         IProgramElement ipe = top.findElementForLabel(top.getRoot(),
+                         IProgramElement.Kind.METHOD,"foo()");
+         assertNotNull("expected formal comment to be non null but" +
+                       " found that it was null",ipe.getFormalComment());
+         
+         ipe = top.findElementForLabel(top.getRoot(),
+                         IProgramElement.Kind.METHOD,"bar()");
+         assertNotNull("expected formal comment to be non null but" +
+                       " found that it was null",ipe.getFormalComment());
+         
+         ipe = top.findElementForLabel(top.getRoot(),
+                         IProgramElement.Kind.METHOD,"goo()");
+         assertNull("expected formal comment to be null but" +
+                       " found that it was " + ipe.getFormalComment(),ipe.getFormalComment());
+
+  }
+  
   public void testBinaryWeavingIntoJava6Library_pr164384() {runTest("binary weaving into java 6 library");}
   public void testCompilanceJava6ThrowsUsageError_pr164384() {runTest("compliance java 6 throws usage error");}
   public void testSourceLevelJava6ThrowsUsageError_pr164384() {runTest("source level java 6 throws usage error");}
index 89cf410cb8a1f03d9886a30036c707118e1cd2cc..c2220a6f0b3d6b0dae5825bb6f43e69e59b6574e 100644 (file)
         </compile>
     </ajc-test> 
 
+    <ajc-test dir="bugs153/pr164356" title="javadoc comments are set if have normal comments">
+      <compile files="C.java" options="-emacssym -XjavadocsInModel"/>
+    </ajc-test>
+    
    <ajc-test dir="bugs153/pr164384" title="compliance java 6 throws usage error">
       <compile files="MainClass.java,Hello.java,MyAnnotation.java" options="-1.6">
          <!--