]> source.dussan.org Git - aspectj.git/commitdiff
164340: ajdoc fix and test
authoraclement <aclement>
Wed, 11 Jun 2008 17:24:43 +0000 (17:24 +0000)
committeraclement <aclement>
Wed, 11 Jun 2008 17:24:43 +0000 (17:24 +0000)
tests/bugs153/pr164340/C.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
tests/src/org/aspectj/systemtest/ajc153/ajc153.xml

diff --git a/tests/bugs153/pr164340/C.java b/tests/bugs153/pr164340/C.java
new file mode 100644 (file)
index 0000000..482dbf4
--- /dev/null
@@ -0,0 +1,15 @@
+public class C {
+
+       /**
+        * This is a constructor
+        */
+       public C() {
+       }
+
+       /**
+        * This is method foo
+        */
+       public void foo() {
+       }
+
+}
index 8e533427f5f3a5bc232a5859d8731f4be398d84f..afe524aba1a05633bf53472e98d6b86f16052084 100644 (file)
@@ -23,6 +23,15 @@ import org.aspectj.weaver.bcel.Utility;
 
 public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+
+  public void testFormalCommentsAreSetForConstructorIPEs_pr164340() {
+         runTest("formal comments are set for constructor ipes");
+         IHierarchy top = AsmManager.getDefault().getHierarchy();
+         IProgramElement ipe = top.findElementForLabel(top.getRoot(),
+                         IProgramElement.Kind.CONSTRUCTOR,"C()");
+         assertNotNull("expected formal comment to be non null but" +
+                               " found that it was null",ipe.getFormalComment());
+  }
   //public void testGenericsProblem_pr151978() { runTest("generics problem");}
   // public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");}
   // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
index c2220a6f0b3d6b0dae5825bb6f43e69e59b6574e..28bda322685ecd91e79a30ffd27ccbdd607fdeea 100644 (file)
          </compile>
     </ajc-test>
 
+    <ajc-test dir="bugs153/pr164340" title="formal comments are set for constructor ipes">
+      <compile files="C.java" options="-emacssym -XjavadocsInModel"/>
+    </ajc-test>
+
     <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice">
       <compile files="Foo.java" options="-1.5"/>
       <run class="Foo"/>