aboutsummaryrefslogtreecommitdiffstats
path: root/ajdoc/src
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-01-30 08:39:41 -0800
committerAndy Clement <aclement@pivotal.io>2019-01-30 08:39:41 -0800
commitbd6a4b2b2fc1633ff2e64cc2d61c88918cc8c1ea (patch)
treedfc05cea0bc1a3ea492f174413f69f8af0c165b3 /ajdoc/src
parent89739bc1ff28a18fadcb27dba7fd26d27ea7b343 (diff)
downloadaspectj-bd6a4b2b2fc1633ff2e64cc2d61c88918cc8c1ea.tar.gz
aspectj-bd6a4b2b2fc1633ff2e64cc2d61c88918cc8c1ea.zip
mavenizing ajdoc - done
Diffstat (limited to 'ajdoc/src')
-rw-r--r--ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocModuleTests.java27
-rw-r--r--ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocOutputChecker.java4
-rw-r--r--ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java6
-rw-r--r--ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTests.java36
-rw-r--r--ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTest.java (renamed from ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTests.java)2
-rw-r--r--ajdoc/src/test/java/org/aspectj/tools/ajdoc/CoverageTestCase.java6
6 files changed, 27 insertions, 54 deletions
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
index 19202e9e3..000000000
--- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocModuleTests.java
+++ /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;
- }
-}
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocOutputChecker.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocOutputChecker.java
index 485b5d80b..2100f7dba 100644
--- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocOutputChecker.java
+++ b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocOutputChecker.java
@@ -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)) {
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java
index e3674086e..26dda1187 100644
--- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java
+++ b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTestCase.java
@@ -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());
}
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTests.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTests.java
index 6debbe13b..52fe56b03 100644
--- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTests.java
+++ b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/AjdocTests.java
@@ -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/BugTests.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTest.java
index 163774864..6caf5d79d 100644
--- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTests.java
+++ b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/BugTest.java
@@ -14,7 +14,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
-public class BugTests extends AjdocTestCase {
+public class BugTest extends AjdocTestCase {
public void testPr160302() throws Exception {
initialiseProject("pr160302");
diff --git a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/CoverageTestCase.java
index e73b94dae..70aaa8b35 100644
--- a/ajdoc/src/test/java/org/aspectj/tools/ajdoc/CoverageTestCase.java
+++ b/ajdoc/src/test/java/org/aspectj/tools/ajdoc/CoverageTestCase.java
@@ -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(