diff options
author | mkersten <mkersten> | 2004-03-11 19:22:42 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2004-03-11 19:22:42 +0000 |
commit | ec9ac363b0379ce8bb8c0783ab338d8ffaa9da02 (patch) | |
tree | 1f040266400ce31f5dd9d2cba4c40c5132c21e2a /ajdoc/testsrc/org | |
parent | 4ee35142ffc1fb7d5776021c533bd4bfbb9cea1c (diff) | |
download | aspectj-ec9ac363b0379ce8bb8c0783ab338d8ffaa9da02.tar.gz aspectj-ec9ac363b0379ce8bb8c0783ab338d8ffaa9da02.zip |
Added support for inheritance documentation, test coverage.v_preCompileLoopAlteration
Diffstat (limited to 'ajdoc/testsrc/org')
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocModuleTests.java | 29 | ||||
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java | 50 | ||||
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/MainTestCase.java (renamed from ajdoc/testsrc/org/aspectj/tools/ajdoc/MainTest.java) | 13 |
3 files changed, 84 insertions, 8 deletions
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocModuleTests.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocModuleTests.java new file mode 100644 index 000000000..f1df75767 --- /dev/null +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/AjdocModuleTests.java @@ -0,0 +1,29 @@ +/* ******************************************************************* + * 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 junit.framework.Test; +import junit.framework.TestSuite; + +/** + * @author Mik Kersten + */ +public class AjdocModuleTests { + public static Test suite() { + TestSuite suite = new TestSuite("Test for org.aspectj.tools.ajdoc"); + //$JUnit-BEGIN$ + suite.addTestSuite(MainTestCase.class); + suite.addTestSuite(ExecutionTestCase.class); + //$JUnit-END$ + return suite; + } +} diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java new file mode 100644 index 000000000..14ee913bf --- /dev/null +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/ExecutionTestCase.java @@ -0,0 +1,50 @@ +/* ******************************************************************* + * 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 java.io.PrintStream; +import java.io.PrintWriter; + +import junit.framework.TestCase; + +import org.aspectj.bridge.Version; +import org.aspectj.util.StreamPrintWriter; + +/** + * @author Mik Kersten + */ +public class ExecutionTestCase extends TestCase { + + public void testVersionMatch() { + String ajdocVersion = Main.getVersion(); + String compilerVersion = Version.text; + assertTrue("version check", ajdocVersion.endsWith(compilerVersion)); + } + + public void testFailingBuild() { + File file1 = new File("testdata/failing-build/Fail.java"); + String[] args = { file1.getAbsolutePath() }; + + org.aspectj.tools.ajdoc.Main.main(args); + assertTrue(Main.hasAborted()); + } + + protected void setUp() throws Exception { + super.setUp(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } +} diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/MainTest.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/MainTestCase.java index 6404ae25b..0863a04b0 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/MainTest.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/MainTestCase.java @@ -18,24 +18,21 @@ import junit.framework.TestCase; /** * @author Mik Kersten */ -public class MainTest extends TestCase { +public class MainTestCase extends TestCase { - - public void testRun() { + public void testSimpleExample() { // System.err.println(new File("testdata/figures-demo").exists()); - File sourcepath = new File("testdata/simple/foo/ClassA.java"); + File file1 = new File("testdata/simple/foo/ClassA.java"); + File file2 = new File("testdata/simple/foo/InterfaceI.java"); File outdir = new File("testdata/simple/doc"); - String[] args = { "-d", outdir.getAbsolutePath(), sourcepath.getAbsolutePath() }; - -// String[] args = { "-sourcepath", sourcepath.getAbsolutePath(), "figures" }; + String[] args = { "-d", outdir.getAbsolutePath(), file1.getAbsolutePath(), file2.getAbsolutePath() }; org.aspectj.tools.ajdoc.Main.main(args); assertTrue(true); } - protected void setUp() throws Exception { super.setUp(); } |