public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+// public void testAtAspectJDecp_pr164016() {
+// runTest("ataspectj decp");
+// }
+
public void testGetMethodNull_pr154427() {
runTest("getMethod returning null");
}
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();
// 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);