summaryrefslogtreecommitdiffstats
path: root/ajdoc
diff options
context:
space:
mode:
authoraclement <aclement>2008-03-20 00:12:46 +0000
committeraclement <aclement>2008-03-20 00:12:46 +0000
commitd4d6cf4b6d2ee80c9ec23d36ee2f1158737bb6ab (patch)
treea42cd1e0e280e1ee3dea5cb8f2295b8d3822d11d /ajdoc
parent331316fef7cc6c6ba77fd0ed63aaed630acaae28 (diff)
downloadaspectj-d4d6cf4b6d2ee80c9ec23d36ee2f1158737bb6ab.tar.gz
aspectj-d4d6cf4b6d2ee80c9ec23d36ee2f1158737bb6ab.zip
164356: test and fix: ajdoc
Diffstat (limited to 'ajdoc')
-rw-r--r--ajdoc/testdata/pr164356/C.java21
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java26
2 files changed, 47 insertions, 0 deletions
diff --git a/ajdoc/testdata/pr164356/C.java b/ajdoc/testdata/pr164356/C.java
new file mode 100644
index 000000000..cb3891efb
--- /dev/null
+++ b/ajdoc/testdata/pr164356/C.java
@@ -0,0 +1,21 @@
+public class C {
+
+ // foo's ordinary comment
+ /**
+ * description of foo
+ */
+ public void foo() {
+ }
+
+ //************
+ /**
+ * description of bar
+ */
+ public void bar() {
+ }
+
+ //******* description of goo
+ public void goo() {
+ }
+
+}
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java
index eeb8f141a..4db3c19f5 100644
--- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/BugTests.java
@@ -130,4 +130,30 @@ public class BugTests extends AjdocTestCase {
assertTrue("expected build of project to abort",Main.hasAborted());
}
+ /**
+ * javadoc comments should still appear even if preceded by
+ * 'normal' comments
+ */
+ public void testPr164356() throws Exception {
+ initialiseProject("pr164356");
+ 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 foo = "description of foo";
+ String bar = "description of bar";
+ String goo = "description of goo";
+ assertTrue("expected method description 'description of foo' to appear" +
+ " in ajdoc output but it did not",
+ AjdocOutputChecker.containsString(htmlFile, foo));
+ assertTrue("expected method description 'description of bar' to " +
+ "appear in ajdoc output but it did not",
+ AjdocOutputChecker.containsString(htmlFile, bar));
+ assertFalse("didn't expect method description 'description of goo' to " +
+ "appear in ajdoc output but it did not",
+ AjdocOutputChecker.containsString(htmlFile, goo));
+ }
}