]> source.dussan.org Git - aspectj.git/commitdiff
Extended test coverage to various permutations of crossing package and type boundarie...
authormkersten <mkersten>
Thu, 8 Apr 2004 16:51:09 +0000 (16:51 +0000)
committermkersten <mkersten>
Thu, 8 Apr 2004 16:51:09 +0000 (16:51 +0000)
ajdoc/testdata/simple/fluffy/Fluffy.java [new file with mode: 0644]
ajdoc/testdata/simple/fluffy/bunny/Bunny.java [new file with mode: 0644]
ajdoc/testdata/simple/fluffy/bunny/rocks/Rocks.java [new file with mode: 0644]
ajdoc/testdata/simple/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java [new file with mode: 0644]
ajdoc/testdata/simple/foo/AspectA.java [deleted file]
ajdoc/testdata/simple/foo/UseThisAspectForLinkCheck.java [new file with mode: 0644]
ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java

diff --git a/ajdoc/testdata/simple/fluffy/Fluffy.java b/ajdoc/testdata/simple/fluffy/Fluffy.java
new file mode 100644 (file)
index 0000000..53bd7b9
--- /dev/null
@@ -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 (file)
index 0000000..d4d44c9
--- /dev/null
@@ -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 (file)
index 0000000..28d24e6
--- /dev/null
@@ -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 (file)
index 0000000..4936cc1
--- /dev/null
@@ -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 (file)
index 2f03301..0000000
+++ /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 (file)
index 0000000..fa24af0
--- /dev/null
@@ -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
index 7e629f96acb9aed517f90e38333f9cbbb15941b3..744f930d67fd06de949114455d876c4caf66416d 100644 (file)
@@ -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);
        }