]> source.dussan.org Git - aspectj.git/commitdiff
283657: fix
authoraclement <aclement>
Fri, 17 Jul 2009 21:29:57 +0000 (21:29 +0000)
committeraclement <aclement>
Fri, 17 Jul 2009 21:29:57 +0000 (21:29 +0000)
tests/multiIncremental/pr283657/base/src/Aspect.java [new file with mode: 0644]
tests/multiIncremental/pr283864/base/src/Failing.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/pr283657/base/src/Aspect.java b/tests/multiIncremental/pr283657/base/src/Aspect.java
new file mode 100644 (file)
index 0000000..2bb1cbb
--- /dev/null
@@ -0,0 +1,14 @@
+public aspect Aspect {
+        int Target.foo = 9;
+
+        void Target.foo() {
+
+        }
+}
+
+
+class Target {
+
+}
+
+
diff --git a/tests/multiIncremental/pr283864/base/src/Failing.java b/tests/multiIncremental/pr283864/base/src/Failing.java
new file mode 100644 (file)
index 0000000..bb50b86
--- /dev/null
@@ -0,0 +1,35 @@
+public aspect Failing {
+    pointcut failingPointcut() : execution(* foo*(..));
+
+    after() returning() : failingPointcut()
+    {
+        System.out.println("hit");
+    }
+}
+
+class X <T extends Object> {
+    // Pointcut match highlighted
+//    void foo() {}
+
+    // Pointcut match highlighted
+//    void foo1(T x) {}   
+
+    // Pointcut not highlighted
+    void foo2(T[] x) {}
+
+    // Pointcut not highlighted
+//    void foo3(T... x) {}
+
+    // Pointcut highlighted
+//    T foo3() { return null; }
+
+    // Pointcut highlighted
+//    T[] foo4() { return null; }
+
+    public static void main(String[] args) {
+        X<Object> x = new X<Object>();
+
+        x.foo2(null);       
+    }
+}
+
index e4261309df1ff46259b0612887021ed99bbb54cd..ee2b22be4351792eae106d96678e40431986d209 100644 (file)
@@ -150,6 +150,32 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertNotNull(rels);
        }
 
+       // public void testArraysGenerics() throws Exception {
+       // String p = "pr283864";
+       // initialiseProject(p);
+       // build(p);
+       // printModel(p);
+       // // IRelationshipMap irm = getModelFor(p).getRelationshipMap();
+       // // List rels = irm.get("=pr280383<f{AnAspect.java}AnAspect)f.AClass.f_AClass_new");
+       // // assertNotNull(rels);
+       // }
+
+       public void testSimilarITDS() throws Exception {
+               String p = "pr283657";
+               initialiseProject(p);
+               build(p);
+               // printModel(p);
+               // Hid:1:(targets=1) =pr283657<{Aspect.java}Aspect)Target.foo (declared on) =pr283657<{Aspect.java[Target
+               // Hid:2:(targets=1) =pr283657<{Aspect.java}Aspect)Target.foo!2 (declared on) =pr283657<{Aspect.java[Target
+               // Hid:3:(targets=2) =pr283657<{Aspect.java[Target (aspect declarations) =pr283657<{Aspect.java}Aspect)Target.foo
+               // Hid:4:(targets=2) =pr283657<{Aspect.java[Target (aspect declarations) =pr283657<{Aspect.java}Aspect)Target.foo!2
+               IRelationshipMap irm = getModelFor(p).getRelationshipMap();
+               List rels = irm.get("=pr283657<{Aspect.java}Aspect)Target.foo");
+               assertNotNull(rels);
+               rels = irm.get("=pr283657<{Aspect.java}Aspect)Target.foo!2");
+               assertNotNull(rels);
+       }
+
        public void testIncrementalAnnotationMatched_276399() throws Exception {
                String p = "pr276399";
                initialiseProject(p);