]> source.dussan.org Git - aspectj.git/commitdiff
280651, 280658, 280676: testcases
authoraclement <aclement>
Wed, 17 Jun 2009 21:25:05 +0000 (21:25 +0000)
committeraclement <aclement>
Wed, 17 Jun 2009 21:25:05 +0000 (21:25 +0000)
tests/multiIncremental/pr280380/inc1/src/g/AnAspect.aj
tests/multiIncremental/pr280651_decmix/base/src/aspects/MixinAspect.java [new file with mode: 0644]
tests/multiIncremental/pr280658_decp/base/src/aspects/ParentsAspect.java [new file with mode: 0644]
tests/multiIncremental/pr280658_target/base/src/test/Foo.class [new file with mode: 0644]
tests/multiIncremental/pr280658_target/base/src/test/Foo.java [new file with mode: 0644]
tests/multiIncremental/pr280676/base/src/p/A.java [new file with mode: 0644]
tests/multiIncremental/pr280676/base/src/p/Foo.aj [new file with mode: 0644]
tests/multiIncremental/pr280676/inc1/src/p/Foo.aj [new file with mode: 0644]
tests/multiIncremental/pr280676/inc2/src/p/Foo.aj [new file with mode: 0644]
tests/multiIncremental/pr280676/inc3/src/p/Foo.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

index aea980cbf0a4d23506de3035ce7f8585bf001f63..c3538cb317d0148341da7e5e21217bf8aa726f77 100644 (file)
@@ -1,9 +1,10 @@
 package g;
 
 import f.AClass;
+import f.*;
 
 public aspect AnAspect {
-       public int f.AClass.xxxx;
+       public int AClass.xxxx;
        
        public int AClass.y() {
                return 0;
diff --git a/tests/multiIncremental/pr280651_decmix/base/src/aspects/MixinAspect.java b/tests/multiIncremental/pr280651_decmix/base/src/aspects/MixinAspect.java
new file mode 100644 (file)
index 0000000..f8925d1
--- /dev/null
@@ -0,0 +1,18 @@
+package aspects;
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class MixinAspect {
+    @DeclareMixin(value = "test.Foo")
+    public static Runnable foo(Object target) {
+        return new DebugDefault();
+    }
+
+    public static class DebugDefault implements Runnable {
+        public void run() {
+            System.out.println("Hi there from MixinAspect");
+        }
+    }
+}
+
diff --git a/tests/multiIncremental/pr280658_decp/base/src/aspects/ParentsAspect.java b/tests/multiIncremental/pr280658_decp/base/src/aspects/ParentsAspect.java
new file mode 100644 (file)
index 0000000..7ad95e3
--- /dev/null
@@ -0,0 +1,16 @@
+package aspects;
+import org.aspectj.lang.annotation.*;
+@Aspect
+public class ParentsAspect {
+
+    @DeclareParents(value = "test.Foo", defaultImpl = DebugDefault.class)
+    public Runnable runnable;
+
+    public static class DebugDefault implements Runnable {
+        public void run() {
+            System.out.println("hi there from ParentsAspect");
+        }
+    }
+}
+
+
diff --git a/tests/multiIncremental/pr280658_target/base/src/test/Foo.class b/tests/multiIncremental/pr280658_target/base/src/test/Foo.class
new file mode 100644 (file)
index 0000000..5681f16
Binary files /dev/null and b/tests/multiIncremental/pr280658_target/base/src/test/Foo.class differ
diff --git a/tests/multiIncremental/pr280658_target/base/src/test/Foo.java b/tests/multiIncremental/pr280658_target/base/src/test/Foo.java
new file mode 100644 (file)
index 0000000..e9f9cb7
--- /dev/null
@@ -0,0 +1,11 @@
+package test;
+import java.util.Arrays;
+public class Foo {
+    public static void main(String[] args) {
+        System.out.println(Arrays.toString(new
+Foo().getClass().getInterfaces()));
+        ((Runnable) new Foo()).run();
+    }
+}
+
+
diff --git a/tests/multiIncremental/pr280676/base/src/p/A.java b/tests/multiIncremental/pr280676/base/src/p/A.java
new file mode 100644 (file)
index 0000000..766c288
--- /dev/null
@@ -0,0 +1,6 @@
+package p;
+
+public class A<N extends Number, T> {
+
+}
+
diff --git a/tests/multiIncremental/pr280676/base/src/p/Foo.aj b/tests/multiIncremental/pr280676/base/src/p/Foo.aj
new file mode 100644 (file)
index 0000000..3c9ab30
--- /dev/null
@@ -0,0 +1,8 @@
+package p;
+
+aspect Foo {
+       
+       int A<X,Y>.i; 
+       
+       public void A<Z,X>.m() {}
+}
diff --git a/tests/multiIncremental/pr280676/inc1/src/p/Foo.aj b/tests/multiIncremental/pr280676/inc1/src/p/Foo.aj
new file mode 100644 (file)
index 0000000..5e6472f
--- /dev/null
@@ -0,0 +1,8 @@
+package p;
+
+aspect Foo {
+       
+       int A.i; // removed type vars 
+       
+       public void A<Z,X>.m() {}
+}
diff --git a/tests/multiIncremental/pr280676/inc2/src/p/Foo.aj b/tests/multiIncremental/pr280676/inc2/src/p/Foo.aj
new file mode 100644 (file)
index 0000000..d774d26
--- /dev/null
@@ -0,0 +1,8 @@
+package p;
+
+aspect Foo {
+       
+       int A.i; // removed type vars 
+       
+       public void A.m() {}
+}
diff --git a/tests/multiIncremental/pr280676/inc3/src/p/Foo.aj b/tests/multiIncremental/pr280676/inc3/src/p/Foo.aj
new file mode 100644 (file)
index 0000000..c51ecc7
--- /dev/null
@@ -0,0 +1,8 @@
+package p;
+
+aspect Foo {
+       
+       int A.i; // removed type vars 
+       
+       public void A<Y,Z>.m() {}
+}
index 63778f474dc2e729a84134f44ffe5d18b94fd30a..9970435a20748b2775d91284c5b58b77e072e218 100644 (file)
@@ -53,6 +53,59 @@ import org.aspectj.util.FileUtil;
  */
 public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
 
+       public void testIncrementalGenericItds_pr280676() throws Exception {
+               String p = "pr280676";
+               initialiseProject(p);
+               build(p);
+               checkWasFullBuild();
+               assertNoErrors(p);
+               alter(p, "inc1"); // remove type variables from ITD field
+               build(p);
+               checkWasFullBuild();
+               assertNoErrors(p);
+               alter(p, "inc2"); // remove type variables from ITD method
+               build(p);
+               checkWasFullBuild();
+               assertNoErrors(p);
+               alter(p, "inc3"); // readded type variables on ITD method
+               build(p);
+               checkWasFullBuild();
+               assertNoErrors(p);
+       }
+
+       // TODO (asc) these tests don't actually verify anything!
+       // public void testAtDeclareParents_280658() throws Exception {
+       // AjdeInteractionTestbed.VERBOSE = true;
+       // String lib = "pr280658_decp";
+       // initialiseProject(lib);
+       // build(lib);
+       // checkWasFullBuild();
+       //
+       // String cli = "pr280658_target";
+       // initialiseProject(cli);
+       //
+       // configureAspectPath(cli, getProjectRelativePath(lib, "bin"));
+       // build(cli);
+       // checkWasFullBuild();
+       // printModel(cli);
+       // }
+       //
+       // public void testAtDeclareMixin_280651() throws Exception {
+       // AjdeInteractionTestbed.VERBOSE = true;
+       // String lib = "pr280651_decmix";
+       // initialiseProject(lib);
+       // build(lib);
+       // checkWasFullBuild();
+       //
+       // String cli = "pr280658_target";
+       // initialiseProject(cli);
+       //
+       // configureAspectPath(cli, getProjectRelativePath(lib, "bin"));
+       // build(cli);
+       // checkWasFullBuild();
+       // printModel(cli);
+       // }
+
        // public void testIncrementalFqItds_280380() throws Exception {
        // String p = "pr280380";
        // initialiseProject(p);