aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten <mkersten>2004-04-08 16:51:09 +0000
committermkersten <mkersten>2004-04-08 16:51:09 +0000
commit994eaa21e4bda868fc25250e1a5bc3f57ab8ec53 (patch)
tree048511a984333970a734fd2f0b91b83b8eaf58e6
parent91a29b735cee8c36e903c6c5dd8e3676d6527536 (diff)
downloadaspectj-994eaa21e4bda868fc25250e1a5bc3f57ab8ec53.tar.gz
aspectj-994eaa21e4bda868fc25250e1a5bc3f57ab8ec53.zip
Extended test coverage to various permutations of crossing package and type boundaries with links.
-rw-r--r--ajdoc/testdata/simple/fluffy/Fluffy.java9
-rw-r--r--ajdoc/testdata/simple/fluffy/bunny/Bunny.java9
-rw-r--r--ajdoc/testdata/simple/fluffy/bunny/rocks/Rocks.java9
-rw-r--r--ajdoc/testdata/simple/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java13
-rw-r--r--ajdoc/testdata/simple/foo/AspectA.java17
-rw-r--r--ajdoc/testdata/simple/foo/UseThisAspectForLinkCheck.java21
-rw-r--r--ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java33
7 files changed, 82 insertions, 29 deletions
diff --git a/ajdoc/testdata/simple/fluffy/Fluffy.java b/ajdoc/testdata/simple/fluffy/Fluffy.java
new file mode 100644
index 000000000..53bd7b97a
--- /dev/null
+++ b/ajdoc/testdata/simple/fluffy/Fluffy.java
@@ -0,0 +1,9 @@
+
+package fluffy;
+
+public class Fluffy {
+
+ void doIt() { }
+
+}
+ \ No newline at end of file
diff --git a/ajdoc/testdata/simple/fluffy/bunny/Bunny.java b/ajdoc/testdata/simple/fluffy/bunny/Bunny.java
new file mode 100644
index 000000000..d4d44c9b5
--- /dev/null
+++ b/ajdoc/testdata/simple/fluffy/bunny/Bunny.java
@@ -0,0 +1,9 @@
+
+package fluffy.bunny;
+
+public class Bunny {
+
+ void doIt() { }
+
+}
+ \ No newline at end of file
diff --git a/ajdoc/testdata/simple/fluffy/bunny/rocks/Rocks.java b/ajdoc/testdata/simple/fluffy/bunny/rocks/Rocks.java
new file mode 100644
index 000000000..28d24e611
--- /dev/null
+++ b/ajdoc/testdata/simple/fluffy/bunny/rocks/Rocks.java
@@ -0,0 +1,9 @@
+
+package fluffy.bunny.rocks;
+
+public class Rocks {
+
+ void doIt() { }
+
+}
+ \ No newline at end of file
diff --git a/ajdoc/testdata/simple/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java b/ajdoc/testdata/simple/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java
new file mode 100644
index 000000000..4936cc18c
--- /dev/null
+++ b/ajdoc/testdata/simple/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java
@@ -0,0 +1,13 @@
+
+package fluffy.bunny.rocks;
+
+import foo.*;
+import fluffy.*;
+import fluffy.bunny.*;
+
+public aspect UseThisAspectForLinkCheckToo {
+
+ before(): execution(* *..*(..)) {
+ System.err.println("yo");
+ }
+} \ No newline at end of file
diff --git a/ajdoc/testdata/simple/foo/AspectA.java b/ajdoc/testdata/simple/foo/AspectA.java
deleted file mode 100644
index 2f03301db..000000000
--- a/ajdoc/testdata/simple/foo/AspectA.java
+++ /dev/null
@@ -1,17 +0,0 @@
-
-package foo;
-
-public aspect AspectA {
-
- int foo;
-
- pointcut mumblePointcut(): execution(* ClassA.*(..));
-
- before(): mumblePointcut() {
- System.err.println("yo");
- }
-
- after(): mumblePointcut() {
- System.err.println("yo");
- }
-} \ No newline at end of file
diff --git a/ajdoc/testdata/simple/foo/UseThisAspectForLinkCheck.java b/ajdoc/testdata/simple/foo/UseThisAspectForLinkCheck.java
new file mode 100644
index 000000000..fa24af093
--- /dev/null
+++ b/ajdoc/testdata/simple/foo/UseThisAspectForLinkCheck.java
@@ -0,0 +1,21 @@
+
+package foo;
+
+import fluffy.*;
+import fluffy.bunny.*;
+import fluffy.bunny.rocks.*;
+
+public aspect UseThisAspectForLinkCheck {
+
+ int foo;
+
+ pointcut allExecutions(): execution(* *..*(..));
+
+ before(): allExecutions() {
+ System.err.println("yo");
+ }
+
+ after(): allExecutions() {
+ System.err.println("go");
+ }
+} \ No newline at end of file
diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java
index 7e629f96a..744f930d6 100644
--- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java
+++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java
@@ -23,26 +23,35 @@ import junit.framework.TestCase;
public class CoverageTestCase extends TestCase {
public void testSimpleExample() {
-
+
// 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/AspectA.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");
String[] args = {
-// "-XajdocDebug",
- "-source",
- "1.4",
- "-d",
- outdir.getAbsolutePath(),
- aspect1.getAbsolutePath(),
- file1.getAbsolutePath(),
- file2.getAbsolutePath(),
- file3.getAbsolutePath(),
- file4.getAbsolutePath()};
+// "-XajdocDebug",
+ "-source",
+ "1.4",
+ "-d",
+ outdir.getAbsolutePath(),
+ aspect1.getAbsolutePath(),
+ file1.getAbsolutePath(),
+ file2.getAbsolutePath(),
+ file3.getAbsolutePath(),
+ file4.getAbsolutePath(),
+ file5.getAbsolutePath(),
+ file6.getAbsolutePath(),
+ file7.getAbsolutePath(),
+ file8.getAbsolutePath()
+ };
org.aspectj.tools.ajdoc.Main.main(args);
}