Browse Source

Package Tests file, aspectjrt.jar finder

tags/PRE_ANDY
wisberg 19 years ago
parent
commit
1ddbc85b27

+ 9
- 14
ajdoc/testsrc/AjdocModuleTests.java View File

@@ -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;
}
}

+ 45
- 0
ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java View File

@@ -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;
}

}

+ 6
- 0
ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java View File

@@ -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(),

+ 2
- 0
ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java View File

@@ -32,6 +32,8 @@ public class PatternsTestCase extends TestCase {
String[] args = {
// "-XajdocDebug",
"-classpath",
AjdocTests.ASPECTJRT_PATH.getPath(),
"-d",
outdir.getAbsolutePath(),
"-sourcepath",

+ 6
- 1
ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java View File

@@ -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",

Loading…
Cancel
Save