]> source.dussan.org Git - aspectj.git/commitdiff
mavenizing ajdoc - done
authorAndy Clement <aclement@pivotal.io>
Wed, 30 Jan 2019 16:39:41 +0000 (08:39 -0800)
committerAndy Clement <aclement@pivotal.io>
Wed, 30 Jan 2019 16:39:41 +0000 (08:39 -0800)
ajdoc/pom.xml
ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocModuleTests.java [deleted file]
ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocOutputChecker.java
ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java
ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTests.java
ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTest.java [new file with mode: 0644]
ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTests.java [deleted file]
ajdoc/src/test/java/org/aspectj/tools/ajdoc/CoverageTestCase.java
org.aspectj.ajdt.core/pom.xml

index 558d1d1c2c3f2ced195c0e9a44207385fc720a79..bfe1c2c3fccf7315183293df71fdad3cec5b0140 100644 (file)
       <artifactId>org.aspectj.ajdt.core</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <dependency>
+    
+  <!-- enables easy dependency on tools.jar -->
+  <groupId>com.github.olivergondza</groupId>
+  <artifactId>maven-jdk-tools-wrapper</artifactId>
+  <version>0.1</version>
+</dependency>
+
+    <dependency>
+      <groupId>asm</groupId>
+      <artifactId>asm</artifactId>
+      <version>1.0</version>
+      <scope>system</scope>
+      <systemPath>${project.basedir}/../lib/asm/asm-7.0-beta.renamed.jar</systemPath>
+    </dependency>
   </dependencies>
 </project>
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocModuleTests.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocModuleTests.java
deleted file mode 100644 (file)
index 19202e9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.aspectj.tools.ajdoc;
-/* *******************************************************************
- * Copyright (c) 2003 Contributors.
- * All rights reserved. 
- * This program and the accompanying materials are made available 
- * under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution and is available at 
- * http://www.eclipse.org/legal/epl-v10.html 
- *  
- * Contributors: 
- *     Mik Kersten     initial implementation 
- * ******************************************************************/
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-/**
- * @author Mik Kersten
- */
-public class AjdocModuleTests {
-    public static Test suite() {
-        TestSuite suite = new TestSuite(AjdocModuleTests.class.getName());
-        suite.addTest(AjdocTests.suite());
-        return suite;
-    }
-}
index 485b5d80b153df96038f14b3d37e4abc6a2be678..2100f7dba5be03de9d1eb0b3aa6c39c84732bd73 100644 (file)
@@ -119,9 +119,9 @@ public class AjdocOutputChecker {
         * @return List of those requiredStrings not found
         * @throws Exception
         */
-       public static List /*String*/ getMissingStringsInSection(File htmlFile,
+       public static List<String> getMissingStringsInSection(File htmlFile,
                        String[] requiredStrings, String sectionHeader) throws Exception {
-               List missingStrings = new ArrayList();
+               List<String> missingStrings = new ArrayList<String>();
                for (int i = 0; i < requiredStrings.length; i++) {
                        String string = requiredStrings[i];
                        if (!containsStringWithinSection(htmlFile,string,sectionHeader)) {
index e3674086e0ea401b8181f963c4a1c57b507caa4a..26dda1187e06083fef725d99bbcfd7dbc8fa206a 100644 (file)
@@ -15,7 +15,7 @@ import java.io.IOException;
 import java.util.Iterator;
 import java.util.List;
 
-import org.aspectj.tools.ajc.Ajc;
+import org.aspectj.testing.util.TestUtil;
 import org.aspectj.util.LangUtil;
 
 import junit.framework.AssertionFailedError;
@@ -25,7 +25,7 @@ import junit.framework.TestCase;
  * This class is the super class of all Ajdoc tests. It creates a sandbox directory and provides utility methods for copying over
  * the test projects and running the ajdoc command
  */
-public class AjdocTestCase extends TestCase {
+public abstract class AjdocTestCase extends TestCase {
 
        public final static String testdataSrcDir = "../ajdoc/testdata";
        protected static File sandboxDir;
@@ -37,7 +37,7 @@ public class AjdocTestCase extends TestCase {
                docOutdir = null;
                projectDir = null;
                // Create a sandbox in which to work
-               sandboxDir = Ajc.createEmptySandbox();
+               sandboxDir = TestUtil.createEmptySandbox();
                // create the ajdocworkdingdir in the sandbox
                Main.setOutputWorkingDir(getWorkingDir().getAbsolutePath());
        }
index 6debbe13b880b39308af183ffd0bb3d594f71fed..52fe56b03a442c9d41124665be802019171cccc3 100644 (file)
@@ -21,7 +21,7 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-public class AjdocTests extends TestCase {
+public class AjdocTests {//extends TestCase {
     
        public static File ASPECTJRT_PATH;
     
@@ -32,22 +32,22 @@ public class AjdocTests extends TestCase {
                 "../runtime/bin"};
         ASPECTJRT_PATH = FileUtil.getBestFile(paths);
     }
-
-    public static Test suite() {
-        TestSuite suite = new TestSuite(AjdocTests.class.getName());
-        //$JUnit-BEGIN$
-        suite.addTestSuite(DeclareFormsTest.class);
-        suite.addTestSuite(SpacewarTestCase.class);
-        suite.addTestSuite(PatternsTestCase.class);
-        suite.addTestSuite(CoverageTestCase.class); 
-        suite.addTestSuite(ITDTest.class);
-        suite.addTestSuite(FullyQualifiedArgumentTest.class);
-        suite.addTestSuite(EnumTest.class);
-        suite.addTestSuite(PointcutVisibilityTest.class);
-        suite.addTestSuite(ExecutionTestCase.class); 
-        suite.addTestSuite(BugTests.class);
-        //$JUnit-END$
-        return suite;
-    }
+//
+//    public static Test suite() {
+//        TestSuite suite = new TestSuite(AjdocTests.class.getName());
+//        //$JUnit-BEGIN$
+//        suite.addTestSuite(DeclareFormsTest.class);
+//        suite.addTestSuite(SpacewarTestCase.class);
+//        suite.addTestSuite(PatternsTestCase.class);
+//        suite.addTestSuite(CoverageTestCase.class); 
+//        suite.addTestSuite(ITDTest.class);
+//        suite.addTestSuite(FullyQualifiedArgumentTest.class);
+//        suite.addTestSuite(EnumTest.class);
+//        suite.addTestSuite(PointcutVisibilityTest.class);
+//        suite.addTestSuite(ExecutionTestCase.class); 
+//        suite.addTestSuite(BugTest.class);
+//        //$JUnit-END$
+//        return suite;
+//    }
 
 }
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTest.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTest.java
new file mode 100644 (file)
index 0000000..6caf5d7
--- /dev/null
@@ -0,0 +1,185 @@
+/********************************************************************
+ * Copyright (c) 2006 Contributors. All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Eclipse Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://eclipse.org/legal/epl-v10.html 
+ *  
+ * Contributors: IBM Corporation - initial API and implementation 
+ *                              Helen Hawkins   - initial version
+ *******************************************************************/
+package org.aspectj.tools.ajdoc;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+public class BugTest extends AjdocTestCase {
+
+       public void testPr160302() throws Exception {
+               initialiseProject("pr160302");
+               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
+               runAjdoc(files);
+               assertFalse("expected clean build of project but found that build aborted",Main.hasAborted());
+               File html = new File(getAbsolutePathOutdir() + File.separator + "C.html");
+               if (!html.exists()) {
+                       fail("couldn't find " + getAbsolutePathOutdir() + File.separator + "C.html - were there javadoc/compilation errors?");
+               }
+               assertFalse("expected all decorating tags to be removed but found that they" +
+                               " weren't",AjdocOutputChecker.containsString(html, Config.DECL_ID_STRING));
+       }
+       
+       /**
+        * Passing the "-Xlint:error" option through to the compiler should
+        * cause the ajc build to fail because the advice did not match
+        */
+       public void testPr148906_1() {
+               initialiseProject("pr148906");
+               File[] files = {new File(getAbsoluteProjectDir() + "/AdviceDidNotMatch.aj")};
+               String[] ajOptions = {new String("-Xlint:error")};
+               runAjdoc(files,"1.5",ajOptions);
+               assertTrue("expected ajc to fail but it did not", Main.hasAborted());
+               assertEquals("expected ajc to fail with an adviceDidNotMatch error but it" +
+                               " failed instead with " + Main.getErrors()[0].getMessage(),
+                               "advice defined in AdviceDidNotMatch has not been applied [Xlint:adviceDidNotMatch]",
+                               Main.getErrors()[0].getMessage());
+       }
+
+       /**
+        * Passing the "-Xlintfile" option through to the compiler should
+        * cause the ajc build to fail because the advice did not match
+        */
+       public void testPr148906_2() {
+               initialiseProject("pr148906");
+               File[] files = {new File(getAbsoluteProjectDir() + "/AdviceDidNotMatch.aj")};
+               String[] ajOptions = {new String("-Xlintfile"), new String(getAbsoluteProjectDir() + File.separator + "Xlint.properties")};
+               runAjdoc(files,"1.5",ajOptions);
+               assertTrue("expected ajc to fail but it did not", Main.hasAborted());
+               assertEquals("expected ajc to fail with an adviceDidNotMatch error but it" +
+                               " failed instead with " + Main.getErrors()[0].getMessage(),
+                               "advice defined in AdviceDidNotMatch has not been applied [Xlint:adviceDidNotMatch]",
+                               Main.getErrors()[0].getMessage());
+       }
+       
+       /**
+        * Passing the -aspectpath option though to the compiler should
+        * result in relationships being displayed
+        */
+       public void testPr148906_3() throws Exception {
+               initialiseProject("pr148906");
+               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
+               String[] ajOptions = {new String("-aspectpath"), new String(getAbsoluteProjectDir() + File.separator + "simple.jar")};
+               runAjdoc(files,"1.6",ajOptions);
+               assertFalse("expected clean build of project but found that build aborted",Main.hasAborted());
+               File html = new File(getAbsolutePathOutdir() + File.separator + "C.html");
+               if (!html.exists()) {
+                       fail("couldn't find " + getAbsolutePathOutdir() + File.separator + "C.html - were there javadoc/compilation errors?");
+               }
+               assertTrue("expected to find 'Advised by' in the html output but did " +
+                               " not",AjdocOutputChecker.containsString(html, 
+                                               HtmlDecorator.HtmlRelationshipKind.ADVISED_BY.getName()));
+       }
+       
+       /**
+        * Passing an option starting with "-" that doesn't require a second entry 
+        * should mean everything is correctly given to the compiler. For example:
+        * '-outxml -aspectpath <file>" should mean both '-outxml' and the aspectpath
+        * options are given correctly.
+        */
+       public void testPr148906_4() throws Exception {
+               initialiseProject("pr148906");
+               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
+               String[] ajOptions = {new String("-outxml"),new String("-aspectpath"), new String(getAbsoluteProjectDir() + File.separator + "simple.jar")};
+               runAjdoc(files,"1.6",ajOptions);
+               assertFalse("expected clean build of project but found that build aborted",Main.hasAborted());
+               File html = new File(getAbsolutePathOutdir() + File.separator + "C.html");
+               if (!html.exists()) {
+                       fail("couldn't find " + getAbsolutePathOutdir() + File.separator + "C.html - were there javadoc/compilation errors?");
+               }
+               assertTrue("expected to find 'Advised by' in the html output but did " +
+                               " not",AjdocOutputChecker.containsString(html, 
+                                               HtmlDecorator.HtmlRelationshipKind.ADVISED_BY.getName()));
+               File aopFile = new File(getAbsolutePathOutdir() + File.separator 
+                               + "META-INF" + File.separator + "aop-ajc.xml");
+               assertTrue("couldn't find " + getAbsolutePathOutdir() + File.separator 
+                               + "META-INF" + File.separator + "aop-ajc.xml" , 
+                               aopFile.exists());
+       }       
+       
+       /**
+        * Passing bogus option to ajc
+        */
+       public void testPr148906_5() throws Exception {
+               initialiseProject("pr148906");
+               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
+               String[] ajOptions = {new String("-bogus")};
+               runAjdoc(files,"1.5",ajOptions);
+               assertTrue("expected build of project to abort",Main.hasAborted());
+       }
+       
+       /**
+        * Not passing any files to ajdoc should result in both the ajdoc
+        * and ajc usage messages
+        */
+       public void testPr148906_6() throws Exception {
+               initialiseProject("pr148906");
+               List options = new ArrayList();
+               options.add("-verbose");
+               runAjdoc(options);
+               assertTrue("expected the ajdoc usage message to be reported",Main.hasShownAjdocUsageMessage());
+               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.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";
+               String bas = "description of bas";
+               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));
+               assertTrue("expected method description 'description of bas' to appear" +
+                               " in ajdoc output but it did not", 
+                               AjdocOutputChecker.containsString(htmlFile, bas));
+       }
+       
+       /**
+        * 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.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));
+       }
+}
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTests.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTests.java
deleted file mode 100644 (file)
index 1637748..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/********************************************************************
- * Copyright (c) 2006 Contributors. All rights reserved. 
- * This program and the accompanying materials are made available 
- * under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution and is available at 
- * http://eclipse.org/legal/epl-v10.html 
- *  
- * Contributors: IBM Corporation - initial API and implementation 
- *                              Helen Hawkins   - initial version
- *******************************************************************/
-package org.aspectj.tools.ajdoc;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-public class BugTests extends AjdocTestCase {
-
-       public void testPr160302() throws Exception {
-               initialiseProject("pr160302");
-               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
-               runAjdoc(files);
-               assertFalse("expected clean build of project but found that build aborted",Main.hasAborted());
-               File html = new File(getAbsolutePathOutdir() + File.separator + "C.html");
-               if (!html.exists()) {
-                       fail("couldn't find " + getAbsolutePathOutdir() + File.separator + "C.html - were there javadoc/compilation errors?");
-               }
-               assertFalse("expected all decorating tags to be removed but found that they" +
-                               " weren't",AjdocOutputChecker.containsString(html, Config.DECL_ID_STRING));
-       }
-       
-       /**
-        * Passing the "-Xlint:error" option through to the compiler should
-        * cause the ajc build to fail because the advice did not match
-        */
-       public void testPr148906_1() {
-               initialiseProject("pr148906");
-               File[] files = {new File(getAbsoluteProjectDir() + "/AdviceDidNotMatch.aj")};
-               String[] ajOptions = {new String("-Xlint:error")};
-               runAjdoc(files,"1.5",ajOptions);
-               assertTrue("expected ajc to fail but it did not", Main.hasAborted());
-               assertEquals("expected ajc to fail with an adviceDidNotMatch error but it" +
-                               " failed instead with " + Main.getErrors()[0].getMessage(),
-                               "advice defined in AdviceDidNotMatch has not been applied [Xlint:adviceDidNotMatch]",
-                               Main.getErrors()[0].getMessage());
-       }
-
-       /**
-        * Passing the "-Xlintfile" option through to the compiler should
-        * cause the ajc build to fail because the advice did not match
-        */
-       public void testPr148906_2() {
-               initialiseProject("pr148906");
-               File[] files = {new File(getAbsoluteProjectDir() + "/AdviceDidNotMatch.aj")};
-               String[] ajOptions = {new String("-Xlintfile"), new String(getAbsoluteProjectDir() + File.separator + "Xlint.properties")};
-               runAjdoc(files,"1.5",ajOptions);
-               assertTrue("expected ajc to fail but it did not", Main.hasAborted());
-               assertEquals("expected ajc to fail with an adviceDidNotMatch error but it" +
-                               " failed instead with " + Main.getErrors()[0].getMessage(),
-                               "advice defined in AdviceDidNotMatch has not been applied [Xlint:adviceDidNotMatch]",
-                               Main.getErrors()[0].getMessage());
-       }
-       
-       /**
-        * Passing the -aspectpath option though to the compiler should
-        * result in relationships being displayed
-        */
-       public void testPr148906_3() throws Exception {
-               initialiseProject("pr148906");
-               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
-               String[] ajOptions = {new String("-aspectpath"), new String(getAbsoluteProjectDir() + File.separator + "simple.jar")};
-               runAjdoc(files,"1.6",ajOptions);
-               assertFalse("expected clean build of project but found that build aborted",Main.hasAborted());
-               File html = new File(getAbsolutePathOutdir() + File.separator + "C.html");
-               if (!html.exists()) {
-                       fail("couldn't find " + getAbsolutePathOutdir() + File.separator + "C.html - were there javadoc/compilation errors?");
-               }
-               assertTrue("expected to find 'Advised by' in the html output but did " +
-                               " not",AjdocOutputChecker.containsString(html, 
-                                               HtmlDecorator.HtmlRelationshipKind.ADVISED_BY.getName()));
-       }
-       
-       /**
-        * Passing an option starting with "-" that doesn't require a second entry 
-        * should mean everything is correctly given to the compiler. For example:
-        * '-outxml -aspectpath <file>" should mean both '-outxml' and the aspectpath
-        * options are given correctly.
-        */
-       public void testPr148906_4() throws Exception {
-               initialiseProject("pr148906");
-               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
-               String[] ajOptions = {new String("-outxml"),new String("-aspectpath"), new String(getAbsoluteProjectDir() + File.separator + "simple.jar")};
-               runAjdoc(files,"1.6",ajOptions);
-               assertFalse("expected clean build of project but found that build aborted",Main.hasAborted());
-               File html = new File(getAbsolutePathOutdir() + File.separator + "C.html");
-               if (!html.exists()) {
-                       fail("couldn't find " + getAbsolutePathOutdir() + File.separator + "C.html - were there javadoc/compilation errors?");
-               }
-               assertTrue("expected to find 'Advised by' in the html output but did " +
-                               " not",AjdocOutputChecker.containsString(html, 
-                                               HtmlDecorator.HtmlRelationshipKind.ADVISED_BY.getName()));
-               File aopFile = new File(getAbsolutePathOutdir() + File.separator 
-                               + "META-INF" + File.separator + "aop-ajc.xml");
-               assertTrue("couldn't find " + getAbsolutePathOutdir() + File.separator 
-                               + "META-INF" + File.separator + "aop-ajc.xml" , 
-                               aopFile.exists());
-       }       
-       
-       /**
-        * Passing bogus option to ajc
-        */
-       public void testPr148906_5() throws Exception {
-               initialiseProject("pr148906");
-               File[] files = {new File(getAbsoluteProjectDir() + "/C.java")};
-               String[] ajOptions = {new String("-bogus")};
-               runAjdoc(files,"1.5",ajOptions);
-               assertTrue("expected build of project to abort",Main.hasAborted());
-       }
-       
-       /**
-        * Not passing any files to ajdoc should result in both the ajdoc
-        * and ajc usage messages
-        */
-       public void testPr148906_6() throws Exception {
-               initialiseProject("pr148906");
-               List options = new ArrayList();
-               options.add("-verbose");
-               runAjdoc(options);
-               assertTrue("expected the ajdoc usage message to be reported",Main.hasShownAjdocUsageMessage());
-               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.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";
-               String bas = "description of bas";
-               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));
-               assertTrue("expected method description 'description of bas' to appear" +
-                               " in ajdoc output but it did not", 
-                               AjdocOutputChecker.containsString(htmlFile, bas));
-       }
-       
-       /**
-        * 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.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));
-       }
-}
index e73b94daef4a066647315eac99d6ebb34fda3a03..70aaa8b35311d71482c6c7e8778d1e61e72ec30e 100644 (file)
@@ -74,7 +74,7 @@ public class CoverageTestCase extends AjdocTestCase {
                // the file contains the getI() method but doesn't contain
                // the private ClassBar, Bazz and Jazz classes.
                String[] strings = { "private", "getI()","ClassBar", "Bazz", "Jazz"};
-               List missing = AjdocOutputChecker.getMissingStringsInFile(htmlFile,strings);
+               List<String> missing = AjdocOutputChecker.getMissingStringsInFile(htmlFile,strings);
                assertEquals("There should be 4 missing strings",4,missing.size());
                assertTrue(htmlFile.getName() + " should not contain the private modifier",missing.contains("private"));
                assertTrue(htmlFile.getName() + " should not contain the private ClassBar class",missing.contains("ClassBar"));
@@ -186,7 +186,7 @@ public class CoverageTestCase extends AjdocTestCase {
                                        "Aspect ClassA</H2>",
                                        "public abstract aspect <B>ClassA</B><DT>extends java.lang.Object<DT>"};
                }
-               List classMissing = AjdocOutputChecker.getMissingStringsInFile(htmlFileClass,classStrings);
+               List<String> classMissing = AjdocOutputChecker.getMissingStringsInFile(htmlFileClass,classStrings);
                assertEquals("There should be 2 missing strings:\n"+classMissing,2,classMissing.size());
                assertTrue(htmlFileClass.getName() + " should not have Aspect as it's title",classMissing.contains("Aspect ClassA</H2>"));
                if (LangUtil.is18VMOrGreater()) {
@@ -222,7 +222,7 @@ public class CoverageTestCase extends AjdocTestCase {
                                "before(int):",
                                "before(int): named()..",
                                "before():"};
-               List missing = AjdocOutputChecker.getMissingStringsInSection(
+               List<String> missing = AjdocOutputChecker.getMissingStringsInSection(
                                htmlFile, strings,"ADVICE DETAIL SUMMARY");
                assertTrue(htmlFile.getName() + " should contain all advice in the Advice Detail section",missing.isEmpty());
                missing = AjdocOutputChecker.getMissingStringsInSection(
index 47bd8c56cd06e06dd02775c6472c1ee7517b9933..bafee1460275627fff65ef931a536c1ef43090b9 100644 (file)
       <version>${project.version}</version>
     </dependency>
   </dependencies>
+
+  <build>
+    <plugins>
+     <plugin>
+       <groupId>org.apache.maven.plugins</groupId>
+       <artifactId>maven-jar-plugin</artifactId>
+       <version>2.2</version>
+       <executions>
+         <execution>
+           <goals>
+             <goal>test-jar</goal>
+           </goals>
+         </execution>
+       </executions>
+     </plugin>
+    </plugins>
+  </build>
+
 </project>