]> source.dussan.org Git - aspectj.git/commitdiff
280380: testcase
authoraclement <aclement>
Tue, 16 Jun 2009 20:16:41 +0000 (20:16 +0000)
committeraclement <aclement>
Tue, 16 Jun 2009 20:16:41 +0000 (20:16 +0000)
tests/multiIncremental/pr280380/base/src/f/AClass.java [new file with mode: 0644]
tests/multiIncremental/pr280380/base/src/g/AnAspect.aj [new file with mode: 0644]
tests/multiIncremental/pr280380/inc1/src/g/AnAspect.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/pr280380/base/src/f/AClass.java b/tests/multiIncremental/pr280380/base/src/f/AClass.java
new file mode 100644 (file)
index 0000000..de14ef1
--- /dev/null
@@ -0,0 +1,11 @@
+package f;
+
+public class AClass {
+
+       
+       void doNothing() {
+               this.y();
+               xxxx++; 
+       }
+}
\ No newline at end of file
diff --git a/tests/multiIncremental/pr280380/base/src/g/AnAspect.aj b/tests/multiIncremental/pr280380/base/src/g/AnAspect.aj
new file mode 100644 (file)
index 0000000..4dbdf89
--- /dev/null
@@ -0,0 +1,15 @@
+package g;
+
+import f.AClass;
+
+public aspect AnAspect {
+       public int AClass.xxxx;
+       
+       public int AClass.y() {
+               return 0;
+       }
+       
+       AClass.new() {
+               this();
+       }
+}  
diff --git a/tests/multiIncremental/pr280380/inc1/src/g/AnAspect.aj b/tests/multiIncremental/pr280380/inc1/src/g/AnAspect.aj
new file mode 100644 (file)
index 0000000..aea980c
--- /dev/null
@@ -0,0 +1,15 @@
+package g;
+
+import f.AClass;
+
+public aspect AnAspect {
+       public int f.AClass.xxxx;
+       
+       public int AClass.y() {
+               return 0;
+       }
+       
+       AClass.new() {
+               this();
+       }
+}  
index 2e6e15c2868a44142640c7a6d84987547c382e2f..8c7f6101483de885edaa193f6e2a79c29f5e0165 100644 (file)
@@ -53,6 +53,22 @@ import org.aspectj.util.FileUtil;
  */
 public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
 
+       // public void testIncrementalFqItds_280380() throws Exception {
+       // String p = "pr280380";
+       // initialiseProject(p);
+       // // build(p);
+       // // printModel(p);
+       // alter(p, "inc1");
+       // build(p);
+       // printModel(p);
+       // // Hid:1:(targets=3) =pr280380<f{AClass.java[AClass (aspect declarations) =pr280380<g*AnAspect.aj}AnAspect)AClass.xxxx
+       // // Hid:2:(targets=3) =pr280380<f{AClass.java[AClass (aspect declarations) =pr280380<g*AnAspect.aj}AnAspect)AClass.y
+       // // Hid:3:(targets=3) =pr280380<f{AClass.java[AClass (aspect declarations) =pr280380<g*AnAspect.aj}AnAspect)AClass.AClass_new
+       // // Hid:4:(targets=1) =pr280380<g*AnAspect.aj}AnAspect)AClass.y (declared on) =pr280380<f{AClass.java[AClass
+       // // Hid:5:(targets=1) =pr280380<g*AnAspect.aj}AnAspect)AClass.AClass_new (declared on) =pr280380<f{AClass.java[AClass
+       // // Hid:6:(targets=1) =pr280380<g*AnAspect.aj}AnAspect)AClass.xxxx (declared on) =pr280380<f{AClass.java[AClass
+       // }
+
        public void testIncrementalAnnotationMatched_276399() throws Exception {
                String p = "pr276399";
                initialiseProject(p);
@@ -69,6 +85,18 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertNull(rels);
        }
 
+       public void testHandleCountDecA_pr278255() throws Exception {
+               String p = "pr278255";
+               initialiseProject(p);
+               build(p);
+               printModelAndRelationships(p);
+               IRelationshipMap irm = getModelFor(p).getRelationshipMap();
+               List l = irm.get("=pr278255<{A.java}X`declare \\@type");
+               assertNotNull(l);
+               IRelationship ir = (IRelationship) l.get(0);
+               assertNotNull(ir);
+       }
+
        public void testIncrementalItdDefaultCtor() {
                String p = "pr275032";
                initialiseProject(p);