aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-24 01:54:43 +0000
committeraclement <aclement>2009-03-24 01:54:43 +0000
commit446370d3a25285bc20bcc670dc9cf57c0504c29f (patch)
tree0cf0ad38b46334ff4e7330a49aee388000d1ef1a /tests
parent9768b96731eec6cb04fc15e46c36d5af63138c8d (diff)
downloadaspectj-446370d3a25285bc20bcc670dc9cf57c0504c29f.tar.gz
aspectj-446370d3a25285bc20bcc670dc9cf57c0504c29f.zip
265993: more jdt like handles
Diffstat (limited to 'tests')
-rw-r--r--tests/multiIncremental/pr265993/base/src/A.java18
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java24
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/multiIncremental/pr265993/base/src/A.java b/tests/multiIncremental/pr265993/base/src/A.java
new file mode 100644
index 000000000..dd6f2ae5e
--- /dev/null
+++ b/tests/multiIncremental/pr265993/base/src/A.java
@@ -0,0 +1,18 @@
+import java.util.Map; import java.util.List;
+public class A<T> {
+ public void m(String s1,java.lang.String s2) {
+ }
+ public void m2(List l) {}
+ public void m3(java.util.ArrayList l) {}
+
+ public void m4(Map<java.lang.String,List> m) {}
+ public void m5(java.util.Map<java.lang.String,List> m) {} // parameterized qualified
+ public void m6(Map<int[], List> mm) {} // single parameterized with array
+ public void m7(int[] mm) {} // primitive array
+ public void m8(java.lang.String[] mm) {}
+ public void m9(String[] mm) {}
+ public void m10(List<String>[][] m) {}
+ public void m11(java.util.List<T> m) {}
+ public void m12(T[] m) {}
+
+}
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index ffb15c619..e3a5f3e38 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -985,6 +985,30 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
assertEquals("=AspectPath4/binaries<(Asp2.class}Asp2&before", findElementAtLine(root, 16).getHandleIdentifier());
}
+ public void testHandleQualification_pr265993() throws IOException {
+ String p = "pr265993";
+ initialiseProject(p);
+ build(p);
+ IProgramElement root = getModelFor(p).getHierarchy().getRoot();
+ dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
+ PrintWriter pw = new PrintWriter(System.out);
+ getModelFor(p).dumprels(pw);
+ pw.flush();
+ assertEquals("=pr265993<{A.java[A~m~QString;~Qjava.lang.String;", findElementAtLine(root, 3).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m2~QList;", findElementAtLine(root, 5).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m3~Qjava.util.ArrayList;", findElementAtLine(root, 6).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m4~QMap\\<Qjava.lang.String;QList;>;", findElementAtLine(root, 8).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m5~Qjava.util.Map\\<Qjava.lang.String;QList;>;", findElementAtLine(root, 9)
+ .getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m6~QMap\\<\\[IQList;>;", findElementAtLine(root, 10).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m7~\\[I", findElementAtLine(root, 11).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m8~\\[Qjava.lang.String;", findElementAtLine(root, 12).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m9~\\[QString;", findElementAtLine(root, 13).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m10~\\[\\[QList\\<QString;>;", findElementAtLine(root, 14).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m11~Qjava.util.List\\<TT;>;", findElementAtLine(root, 15).getHandleIdentifier());
+ assertEquals("=pr265993<{A.java[A~m12~\\[TT;", findElementAtLine(root, 16).getHandleIdentifier());
+ }
+
/**
* A change is made to an aspect on the aspectpath (staticinitialization() advice is added) for another project.
* <p>