diff options
author | mkersten <mkersten> | 2004-04-08 23:40:27 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2004-04-08 23:40:27 +0000 |
commit | d982fcb06bb76b48c1d64970c22a1e788476176c (patch) | |
tree | 996f85291b4fd2ebd557c170919c89c058c2a940 /ajdoc/testsrc | |
parent | fc8ac16539d6142b0abd9c690e6844fbd6d4c599 (diff) | |
download | aspectj-d982fcb06bb76b48c1d64970c22a1e788476176c.tar.gz aspectj-d982fcb06bb76b48c1d64970c22a1e788476176c.zip |
Extended test coverage.
Diffstat (limited to 'ajdoc/testsrc')
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java | 29 | ||||
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java | 98 |
2 files changed, 113 insertions, 14 deletions
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java index 744f930d6..451f72969 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java @@ -22,24 +22,25 @@ import junit.framework.TestCase; */ public class CoverageTestCase extends TestCase { - public void testSimpleExample() { + public void testCoverage() { // System.err.println(new File("testdata/figures-demo").exists()); - File file1 = new File("testdata/simple/foo/ClassA.java"); - File aspect1 = new File("testdata/simple/foo/UseThisAspectForLinkCheck.java"); - File file2 = new File("testdata/simple/foo/InterfaceI.java"); - File file3 = new File("testdata/simple/foo/PlainJava.java"); - File file4 = new File("testdata/simple/foo/ModelCoverage.java"); - File file5 = new File("testdata/simple/fluffy/Fluffy.java"); - File file6 = new File("testdata/simple/fluffy/bunny/Bunny.java"); - File file7 = new File("testdata/simple/fluffy/bunny/rocks/Rocks.java"); - File file8 = new File("testdata/simple/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java"); - File outdir = new File("testdata/simple/doc"); + File file1 = new File("testdata/coverage/foo/ClassA.java"); + File aspect1 = new File("testdata/coverage/foo/UseThisAspectForLinkCheck.java"); + File file2 = new File("testdata/coverage/foo/InterfaceI.java"); + File file3 = new File("testdata/coverage/foo/PlainJava.java"); + File file4 = new File("testdata/coverage/foo/ModelCoverage.java"); + File file5 = new File("testdata/coverage/fluffy/Fluffy.java"); + File file6 = new File("testdata/coverage/fluffy/bunny/Bunny.java"); + File file7 = new File("testdata/coverage/fluffy/bunny/rocks/Rocks.java"); + File file8 = new File("testdata/coverage/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java"); + File outdir = new File("testdata/coverage/doc"); String[] args = { // "-XajdocDebug", - "-source", + "-source", "1.4", + "-private", "-d", outdir.getAbsolutePath(), aspect1.getAbsolutePath(), @@ -57,8 +58,8 @@ public class CoverageTestCase extends TestCase { } // public void testPlainJava() { -// File file1 = new File("testdata/simple/foo/PlainJava.java"); -// File outdir = new File("testdata/simple/doc"); +// File file1 = new File("testdata/coverage/foo/PlainJava.java"); +// File outdir = new File("testdata/coverage/doc"); // // String[] args = { "-d", // outdir.getAbsolutePath(), diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java new file mode 100644 index 000000000..d82d5c871 --- /dev/null +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/PatternsTestCase.java @@ -0,0 +1,98 @@ +/* ******************************************************************* + * 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; + +/** + * A long way to go until full coverage, but this is the place to add more. + * + * @author Mik Kersten + */ +public class PatternsTestCase extends TestCase { + + public void testSimpleExample() { + +// 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"); + + String[] args = { +// "-XajdocDebug", + "-d", + outdir.getAbsolutePath(), + "-sourcepath", + srcdir.getAbsolutePath(), + "ca.ubc.cs.spl.aspectPatterns.patternLibrary", + "ca.ubc.cs.spl.aspectPatterns.examples.abstractFactory.java", + "ca.ubc.cs.spl.aspectPatterns.examples.abstractFactory.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.builder.java", + "ca.ubc.cs.spl.aspectPatterns.examples.builder.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.factoryMethod.java", + "ca.ubc.cs.spl.aspectPatterns.examples.factoryMethod.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.prototype.java", + "ca.ubc.cs.spl.aspectPatterns.examples.prototype.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.singleton.java", + "ca.ubc.cs.spl.aspectPatterns.examples.singleton.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.adapter.java", + "ca.ubc.cs.spl.aspectPatterns.examples.adapter.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.bridge.java", + "ca.ubc.cs.spl.aspectPatterns.examples.bridge.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.composite.java", + "ca.ubc.cs.spl.aspectPatterns.examples.composite.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.decorator.java", + "ca.ubc.cs.spl.aspectPatterns.examples.decorator.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.facade.java", + "ca.ubc.cs.spl.aspectPatterns.examples.facade.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.flyweight.java", + "ca.ubc.cs.spl.aspectPatterns.examples.flyweight.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.proxy.java", + "ca.ubc.cs.spl.aspectPatterns.examples.proxy.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.chainOfResponsibility.java", + "ca.ubc.cs.spl.aspectPatterns.examples.chainOfResponsibility.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.command.java", + "ca.ubc.cs.spl.aspectPatterns.examples.command.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.interpreter.java", + "ca.ubc.cs.spl.aspectPatterns.examples.interpreter.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.iterator.java", + "ca.ubc.cs.spl.aspectPatterns.examples.iterator.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.mediator.java", + "ca.ubc.cs.spl.aspectPatterns.examples.mediator.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.memento.java", + "ca.ubc.cs.spl.aspectPatterns.examples.memento.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.observer.java", + "ca.ubc.cs.spl.aspectPatterns.examples.observer.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.state.java", + "ca.ubc.cs.spl.aspectPatterns.examples.state.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.strategy.java", + "ca.ubc.cs.spl.aspectPatterns.examples.strategy.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.templateMethod.java", + "ca.ubc.cs.spl.aspectPatterns.examples.templateMethod.aspectj", + "ca.ubc.cs.spl.aspectPatterns.examples.visitor.java", + "ca.ubc.cs.spl.aspectPatterns.examples.visitor.aspectj" + }; + + org.aspectj.tools.ajdoc.Main.main(args); + } + + protected void setUp() throws Exception { + super.setUp(); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } +} |