diff options
author | aclement <aclement> | 2008-12-04 02:04:55 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-12-04 02:04:55 +0000 |
commit | c2a2fc097355c1f7c6940d71e266110bfc3cef12 (patch) | |
tree | b7f15059d33968d9f2e3b92e97f1f8d05c0a0d5b | |
parent | 84078de0516902f72e9331528e791b9954d5cff4 (diff) | |
download | aspectj-c2a2fc097355c1f7c6940d71e266110bfc3cef12.tar.gz aspectj-c2a2fc097355c1f7c6940d71e266110bfc3cef12.zip |
249216: handle changes
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java | 42 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java | 12 |
2 files changed, 48 insertions, 6 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java index 87ac9b321..cc5e25a6c 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -28,6 +28,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { +// public void testAtAspectJDecp_pr164016() { +// runTest("ataspectj decp"); +// } + public void testGetMethodNull_pr154427() { runTest("getMethod returning null"); } @@ -40,12 +44,38 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("mixed styles"); } - /* - * public void testHandles_pr249216c24() { runTest("handles - escaped square brackets"); IHierarchy top = - * AsmManager.lastActiveStructureModel.getHierarchy(); IProgramElement itd = findElementAtLine(top.getRoot(), 4); // - * System.out.println(itd.getHandleIdentifier()); assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[String;>;", - * itd.getHandleIdentifier()); } - */ + public void testHandles_pr249216c24() { + runTest("handles - escaped square brackets"); + IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy(); + IProgramElement ipe = null; + ipe = findElementAtLine(top.getRoot(), 4);// public java.util.List<String> Ship.i(List<String>[][] u) + assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[Qjava.util.List\\<QString;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 7);// public java.util.List<String> Ship.i(Set<String>[][] u) + assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[Qjava.util.Set\\<QString;>;", ipe.getHandleIdentifier()); + + // public java.util.Set<String> i(java.util.Set<String>[][] u) + ipe = findElementAtLine(top.getRoot(), 10); + assertEquals("<{Handles.java}Handles~i~\\[\\[Qjava.util.Set\\<QString;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 13);// public java.util.Set<String> i(java.util.Set<String>[][] u,int i) { + assertEquals("<{Handles.java}Handles~i~\\[\\[Qjava.util.Set\\<QString;>;~I", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 16);// public java.util.Set<String> i(java.util.Set<String>[][] u,int i) { + assertEquals("<{Handles.java}Handles~i2~\\[\\[Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 19);// public java.util.Set<String> i3(java.util.Set<? extends + // Collection<String[]>>[][] u) + assertEquals("<{Handles.java}Handles~i3~\\[\\[Qjava.util.Set\\<+QCollection\\<\\[QString;>;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 22); + assertEquals("<{Handles.java}Handles~i4~Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier()); + + ipe = findElementAtLine(top.getRoot(), 25); + assertEquals("<{Handles.java}Handles~i5~Qjava.util.Set\\<*>;", ipe.getHandleIdentifier()); + + } + public void testFQType_pr256937() { runTest("fully qualified return type"); IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy(); diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index f3bd75376..d5760ad61 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -212,6 +212,18 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa // Ajc.dumpAJDEStructureModel(getModelFor("pr253067"), "after inc build where first advised line is gone"); } + public void testHandles_DeclareAnno_pr249216_c9() { + String p = "pr249216"; + initialiseProject(p); + build(p); + IProgramElement root = getModelFor(p).getHierarchy().getRoot(); + IProgramElement code = findElementAtLine(root, 4); + // the @ should be escapified + assertEquals("=pr249216<{Deca.java}X`declare \\@type", code.getHandleIdentifier()); + // dumptree(getModelFor(p).getHierarchy().getRoot(), 0); + // Ajc.dumpAJDEStructureModel(getModelFor(p), "after inc build where first advised line is gone"); + } + public void testNullDelegateBrokenCode_pr251940() { String p = "pr251940"; initialiseProject(p); |