diff options
author | aclement <aclement> | 2008-06-11 17:24:42 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-06-11 17:24:42 +0000 |
commit | 8d7f7e1d4ad5e302b60074db044636817ba4e5a5 (patch) | |
tree | b57a1dd263575ba9da85fd02da333b9b8c441ebd /ajdoc | |
parent | 27e794ebf410b678643cd079a1b9a285774b46e8 (diff) | |
download | aspectj-8d7f7e1d4ad5e302b60074db044636817ba4e5a5.tar.gz aspectj-8d7f7e1d4ad5e302b60074db044636817ba4e5a5.zip |
164340: ajdoc fix and test
Diffstat (limited to 'ajdoc')
-rw-r--r-- | ajdoc/testdata/pr164340/C.java | 15 | ||||
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java | 22 |
2 files changed, 37 insertions, 0 deletions
diff --git a/ajdoc/testdata/pr164340/C.java b/ajdoc/testdata/pr164340/C.java new file mode 100644 index 000000000..482dbf481 --- /dev/null +++ b/ajdoc/testdata/pr164340/C.java @@ -0,0 +1,15 @@ +public class C { + + /** + * This is a constructor + */ + public C() { + } + + /** + * This is method foo + */ + public void foo() { + } + +} diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java index 4db3c19f5..c1749875f 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java @@ -156,4 +156,26 @@ public class BugTests extends AjdocTestCase { "appear in ajdoc output but it did not", AjdocOutputChecker.containsString(htmlFile, goo)); } + + /** + * Comments for a constructor should be included in the ajdoc output + */ + public void testPr164340() throws Exception { + initialiseProject("pr164340"); + File[] files = {new File(getAbsoluteProjectDir() + "/C.java")}; + runAjdoc(files); + File htmlFile = new File(getAbsolutePathOutdir() + "/C.html"); + if (htmlFile == null || !htmlFile.exists()) { + fail("couldn't find " + htmlFile.getAbsolutePath() + + " (ajc aborted: " + Main.hasAborted() + ")"); + } + String methodDesc = "This is method foo"; + String constDesc = "This is a constructor"; + assertTrue("expected method description 'This is method foo' to appear" + + " in ajdoc output but it did not", + AjdocOutputChecker.containsString(htmlFile, methodDesc)); + assertTrue("expected constructor description 'This is a constructor' to " + + "appear in ajdoc output but it did not", + AjdocOutputChecker.containsString(htmlFile, constDesc)); + } } |