aboutsummaryrefslogtreecommitdiffstats
path: root/ajdoc
diff options
context:
space:
mode:
authorwisberg <wisberg>2005-06-08 23:36:31 +0000
committerwisberg <wisberg>2005-06-08 23:36:31 +0000
commit1ddbc85b271627993a4d64e1f777a09f31e31aab (patch)
tree32fc40aa5da6209cf2e9eab8f65d42f7799a7281 /ajdoc
parentf65bc76fdf72ca584b534ab8ae983583c0b241f1 (diff)
downloadaspectj-1ddbc85b271627993a4d64e1f777a09f31e31aab.tar.gz
aspectj-1ddbc85b271627993a4d64e1f777a09f31e31aab.zip
Package Tests file, aspectjrt.jar finder
Diffstat (limited to 'ajdoc')
-rw-r--r--ajdoc/testsrc/AjdocModuleTests.java23
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java45
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java6
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java2
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java7
5 files changed, 68 insertions, 15 deletions
diff --git a/ajdoc/testsrc/AjdocModuleTests.java b/ajdoc/testsrc/AjdocModuleTests.java
index a840b35a6..d829c78d8 100644
--- a/ajdoc/testsrc/AjdocModuleTests.java
+++ b/ajdoc/testsrc/AjdocModuleTests.java
@@ -9,26 +9,21 @@
* Contributors:
* Mik Kersten initial implementation
* ******************************************************************/
-import org.aspectj.tools.ajdoc.CoverageTestCase;
-import org.aspectj.tools.ajdoc.ExecutionTestCase;
-import org.aspectj.tools.ajdoc.PatternsTestCase;
-import org.aspectj.tools.ajdoc.SpacewarTestCase;
+import java.io.File;
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.aspectj.tools.ajdoc.AjdocTests;
+import org.aspectj.util.FileUtil;
+
/**
* @author Mik Kersten
*/
public class AjdocModuleTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.aspectj.tools.ajdoc");
- //$JUnit-BEGIN$
- suite.addTestSuite(SpacewarTestCase.class);
- suite.addTestSuite(PatternsTestCase.class);
- suite.addTestSuite(CoverageTestCase.class);
- suite.addTestSuite(ExecutionTestCase.class);// !!! must be last because it exists
- //$JUnit-END$
- return suite;
- }
+ public static Test suite() {
+ TestSuite suite = new TestSuite(AjdocModuleTests.class.getName());
+ suite.addTest(AjdocTests.suite());
+ return suite;
+ }
}
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java
new file mode 100644
index 000000000..1c4a1847b
--- /dev/null
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java
@@ -0,0 +1,45 @@
+/* *******************************************************************
+ * Copyright (c) 2005 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:
+ * Wes Isberg initial implementation
+ * ******************************************************************/
+
+
+package org.aspectj.tools.ajdoc;
+
+import java.io.File;
+
+import org.aspectj.util.FileUtil;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class AjdocTests extends TestCase {
+ public static File ASPECTJRT_PATH;
+ static {
+ String[] paths = { "sp:aspectjrt.path", "sp:aspectjrt.jar",
+ "../lib/test/aspectjrt.jar", "../aj-build/jars/aspectj5rt-all.jar",
+ "../aj-build/jars/runtime.jar",
+ "../runtime/bin"};
+ ASPECTJRT_PATH = FileUtil.getBestFile(paths);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite(AjdocTests.class.getName());
+ //$JUnit-BEGIN$
+ suite.addTestSuite(SpacewarTestCase.class);
+ suite.addTestSuite(PatternsTestCase.class);
+ suite.addTestSuite(CoverageTestCase.class);
+ suite.addTestSuite(ExecutionTestCase.class);// !!! must be last because it exists
+ //$JUnit-END$
+ return suite;
+ }
+
+}
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java
index c03a4ecd7..d6a9cd1a0 100644
--- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java
@@ -47,6 +47,8 @@ public class CoverageTestCase extends TestCase {
"EUCJIS",
"-charset",
"UTF-8",
+ "-classpath",
+ AjdocTests.ASPECTJRT_PATH.getPath(),
"-d",
outdir.getAbsolutePath(),
file0.getAbsolutePath(),
@@ -61,6 +63,8 @@ public class CoverageTestCase extends TestCase {
"-public",
"-source",
"1.4",
+ "-classpath",
+ AjdocTests.ASPECTJRT_PATH.getPath(),
"-d",
outdir.getAbsolutePath(),
file3.getAbsolutePath(),
@@ -76,6 +80,8 @@ public class CoverageTestCase extends TestCase {
"-source",
"1.4",
"-private",
+ "-classpath",
+ AjdocTests.ASPECTJRT_PATH.getPath(),
"-d",
outdir.getAbsolutePath(),
aspect1.getAbsolutePath(),
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java
index d82d5c871..f8551a2db 100644
--- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java
@@ -32,6 +32,8 @@ public class PatternsTestCase extends TestCase {
String[] args = {
// "-XajdocDebug",
+ "-classpath",
+ AjdocTests.ASPECTJRT_PATH.getPath(),
"-d",
outdir.getAbsolutePath(),
"-sourcepath",
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java
index 7556234e6..1b3f5c509 100644
--- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java
@@ -29,7 +29,10 @@ public class SpacewarTestCase extends TestCase {
File outdir = new File("testdata/spacewar/docdir");
File sourcepath = new File("testdata/spacewar");
- String[] args = { "-d",
+ String[] args = {
+ "-classpath",
+ AjdocTests.ASPECTJRT_PATH.getPath(),
+ "-d",
outdir.getAbsolutePath(),
"-sourcepath",
sourcepath.getAbsolutePath(),
@@ -46,6 +49,8 @@ public class SpacewarTestCase extends TestCase {
String[] args = {
"-public",
+ "-classpath",
+ AjdocTests.ASPECTJRT_PATH.getPath(),
"-d",
outdir.getAbsolutePath(),
"-sourcepath",