public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testHandles_pr263310() {
+ runTest("inner handles");
+ IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
+ IProgramElement ipe = null;
+ ipe = findElementAtLine(top.getRoot(), 13);
+ assertEquals("<p{HandleTestingAspect.java}HandleTestingAspect[InnerClass}InnerInnerAspect|1", ipe.getHandleIdentifier());
+ // ipe = findElementAtLine(top.getRoot(), 29);
+ // assertEquals("<x*OverrideOptions.aj}OverrideOptions&around!2", ipe.getHandleIdentifier());
+ }
+
public void testHandles_pr263666() {
runTest("around advice handles");
IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
IProgramElement ipe = null;
- ipe = findElementAtLine(top.getRoot(), 22);// public java.util.List<String> Ship.i(List<String>[][] u)
+ ipe = findElementAtLine(top.getRoot(), 22);
assertEquals("<x*OverrideOptions.aj}OverrideOptions&around", ipe.getHandleIdentifier());
- ipe = findElementAtLine(top.getRoot(), 29);// public java.util.List<String> Ship.i(List<String>[][] u)
+ ipe = findElementAtLine(top.getRoot(), 29);
assertEquals("<x*OverrideOptions.aj}OverrideOptions&around!2", ipe.getHandleIdentifier());
}
-/*
+
// Only one of two aspects named
public void testAopConfig1() {
runTest("aop config - 1");
public void testAopConfig2() {
runTest("aop config - 2");
}
-*/
+
+ // Invalid scope specified - cannot be parsed as type pattern
+ public void testAopConfig3() {
+ runTest("aop config - 3");
+ }
+
public void testAjcThisNotRead() {
runTest("ajcthis not read");
}
<suite>
- <ajc-test dir="bugs164/pr263666" title="around advice handles">
- <compile files="x/A.java x/B.java x/OverrideOptions.aj" options="-1.5 -emacssym"/>
- </ajc-test>
-
-
<ajc-test dir="features164/aopconfig/one" title="aop config - 1">
<compile files="A.java A2.java B.java foo.xml" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'staticinitialization(void A.<clinit>())' in Type 'A' (A.java:1) advised by before advice from 'A' (A.java:2)"/>
</compile>
</ajc-test>
+ <ajc-test dir="features164/aopconfig/two" title="aop config - 3">
+ <!-- type pattern in the scope in foo.xml is complete nonsense -->
+ <compile files="A.java B.java foo.xml" options="-1.5 -Xlint:ignore">
+ <message kind="error" text="Unable to parse scope as type pattern"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs164/pr263310" title="inner handles">
+ <compile files="HandleTestingAspect.java" options="-1.5 -emacssym -Xlint:ignore"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs164/pr263666" title="around advice handles">
+ <compile files="x/A.java x/B.java x/OverrideOptions.aj" options="-1.5 -emacssym"/>
+ </ajc-test>
+
<ajc-test dir="bugs164" title="ajcthis not read">
<compile files="pr195090.java" options="-1.5 -warn:+unusedArgument">
</compile>