diff options
author | mkersten <mkersten> | 2005-10-05 16:15:43 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2005-10-05 16:15:43 +0000 |
commit | ab6c7a562a887b70c6b5ad0ac644e7af58394aa3 (patch) | |
tree | 061c4d30dd2a9f270d7d8a56b343bf87bde94611 /ajdoc/testsrc | |
parent | aced19f8d64774cb18d33bc2252511f5a02ce53f (diff) | |
download | aspectj-ab6c7a562a887b70c6b5ad0ac644e7af58394aa3.tar.gz aspectj-ab6c7a562a887b70c6b5ad0ac644e7af58394aa3.zip |
Fixed Bug #56779: [ajdoc] add ajdoc support for inter-type declarations and other declare forms
Also fixed ajdoc tests to run correctly when executed via RunTheseBeforeYouCommit tests (previously they were not being run and silently failing).
Diffstat (limited to 'ajdoc/testsrc')
7 files changed, 74 insertions, 20 deletions
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java index 1c4a1847b..5ec25317d 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocTests.java @@ -22,7 +22,9 @@ import junit.framework.TestCase; import junit.framework.TestSuite; public class AjdocTests extends TestCase { - public static File ASPECTJRT_PATH; + + public static File ASPECTJRT_PATH; + static { String[] paths = { "sp:aspectjrt.path", "sp:aspectjrt.jar", "../lib/test/aspectjrt.jar", "../aj-build/jars/aspectj5rt-all.jar", @@ -34,6 +36,7 @@ public class AjdocTests extends TestCase { 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); diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java index d6a9cd1a0..316f03280 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java @@ -22,18 +22,18 @@ import junit.framework.TestCase; */ public class CoverageTestCase extends TestCase { - protected File file0 = new File("testdata/coverage/InDefaultPackage.java"); - protected File file1 = new File("testdata/coverage/foo/ClassA.java"); - protected File aspect1 = new File("testdata/coverage/foo/UseThisAspectForLinkCheck.aj"); - protected File file2 = new File("testdata/coverage/foo/InterfaceI.java"); - protected File file3 = new File("testdata/coverage/foo/PlainJava.java"); - protected File file4 = new File("testdata/coverage/foo/ModelCoverage.java"); - protected File file5 = new File("testdata/coverage/fluffy/Fluffy.java"); - protected File file6 = new File("testdata/coverage/fluffy/bunny/Bunny.java"); - protected File file7 = new File("testdata/coverage/fluffy/bunny/rocks/Rocks.java"); - protected File file8 = new File("testdata/coverage/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java"); - protected File file9 = new File("testdata/coverage/foo/PkgVisibleClass.java"); - protected File file10 = new File("testdata/coverage/foo/NoMembers.java"); + protected File file0 = new File("../ajdoc/testdata/coverage/InDefaultPackage.java"); + protected File file1 = new File("../ajdoc/testdata/coverage/foo/ClassA.java"); + protected File aspect1 = new File("../ajdoc/testdata/coverage/foo/UseThisAspectForLinkCheck.aj"); + protected File file2 = new File("../ajdoc/testdata/coverage/foo/InterfaceI.java"); + protected File file3 = new File("../ajdoc/testdata/coverage/foo/PlainJava.java"); + protected File file4 = new File("../ajdoc/testdata/coverage/foo/ModelCoverage.java"); + protected File file5 = new File("../ajdoc/testdata/coverage/fluffy/Fluffy.java"); + protected File file6 = new File("../ajdoc/testdata/coverage/fluffy/bunny/Bunny.java"); + protected File file7 = new File("../ajdoc/testdata/coverage/fluffy/bunny/rocks/Rocks.java"); + protected File file8 = new File("../ajdoc/testdata/coverage/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java"); + protected File file9 = new File("../ajdoc/testdata/coverage/foo/PkgVisibleClass.java"); + protected File file10 = new File("../ajdoc/testdata/coverage/foo/NoMembers.java"); protected File outdir = new File("testdata/coverage/doc"); diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java new file mode 100644 index 000000000..f8c09e34b --- /dev/null +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/DeclareFormsTest.java @@ -0,0 +1,51 @@ +/* ******************************************************************* + * Copyright (c) 2003 Contributors. + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Common Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * Mik Kersten initial implementation + * ******************************************************************/ + +package org.aspectj.tools.ajdoc; + +import java.io.File; + +import junit.framework.TestCase; + +/** + * @author Mik Kersten + */ +public class DeclareFormsTest extends TestCase { + + protected File file0 = new File("../ajdoc/testdata/declareForms/DeclareCoverage.java"); + protected File outdir = new File("../ajdoc/testdata/declareForms/doc"); + + public void testCoverage() { + assertTrue(file0.exists()); + outdir.delete(); + String[] args = { +// "-XajdocDebug", + "-source", + "1.4", + "-private", + "-classpath", + AjdocTests.ASPECTJRT_PATH.getPath(), + "-d", + outdir.getAbsolutePath(), + file0.getAbsolutePath(), + }; + org.aspectj.tools.ajdoc.Main.main(args); + } + + protected void setUp() throws Exception { + super.setUp(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } +} diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java index f14c757e6..c7ca99cf1 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java @@ -30,7 +30,7 @@ public class ExecutionTestCase extends TestCase { } public void testFailingBuild() { - File file1 = new File("testdata/failing-build/Fail.java"); + File file1 = new File("../ajdoc/testdata/failing-build/Fail.java"); String[] args = { file1.getAbsolutePath() }; org.aspectj.tools.ajdoc.Main.main(args); diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java index f8551a2db..d0dd93a16 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java @@ -28,7 +28,7 @@ public class PatternsTestCase extends TestCase { // System.err.println(new File("testdata.figures-demo").exists()); // File file1 = new File("testdata/patterns/allPatterns.lst"); File outdir = new File("testdata/patterns/doc"); - File srcdir = new File("../docs/sandbox/ubc-design-patterns/src"); + File srcdir = new File("../../docs/sandbox/ubc-design-patterns/src"); String[] args = { // "-XajdocDebug", diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java index 760e4c22c..7a5d34a33 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PointcutVisibilityTest.java @@ -12,8 +12,8 @@ import junit.framework.TestCase; */ public class PointcutVisibilityTest extends TestCase { - protected File file1 = new File("testdata/bug82340/Pointcuts.java"); - protected File outdir = new File("testdata/bug82340/doc"); + protected File file1 = new File("../ajdoc/testdata/bug82340/Pointcuts.java"); + protected File outdir = new File("../ajdoc/testdata/bug82340/doc"); public void testCoveragePublicMode() { outdir.delete(); diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java index 1b3f5c509..0825ade26 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/SpacewarTestCase.java @@ -22,7 +22,7 @@ public class SpacewarTestCase extends TestCase { protected void setUp() throws Exception { super.setUp(); - new File("testdata/spacewar/docdir").delete(); + new File("../ajdoc/testdata/spacewar/docdir").delete(); } public void testSimpleExample() { @@ -44,8 +44,8 @@ public class SpacewarTestCase extends TestCase { } public void testPublicModeExample() { - File outdir = new File("testdata/spacewar/docdir"); - File sourcepath = new File("testdata/spacewar"); + File outdir = new File("../ajdoc/testdata/spacewar/docdir"); + File sourcepath = new File("../ajdoc/testdata/spacewar"); String[] args = { "-public", |