Browse Source

tests for pr104220 - poor toString implementations for adviceexecution join points.

tags/V1_5_0RC1
acolyer 18 years ago
parent
commit
f6968e6f13

+ 29
- 0
tests/bugs150/Pr104220.aj View File

@@ -0,0 +1,29 @@
// pr104220 - adviceexecution joinpoint toString forms

public aspect Pr104220 {
before() : adviceexecution() && !within(Pr104220) {
System.out.println(thisJoinPoint.getKind());
System.out.println(thisJoinPoint.toString());
System.out.println(thisJoinPoint.toShortString());
System.out.println(thisJoinPoint.toLongString());
}

public static void main(String[] args) {
new C().foo();
}
}

class C {
public void foo() {}
}

aspect SomeAspect {
before() : execution(* foo(..)) {}
}


+ 4
- 0
tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java View File

@@ -674,6 +674,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("Anonymous types and nome matching");
}
public void testAdviceExecutionJPToStringForms() {
runTest("adviceexecution join point toString forms");
}
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {

+ 12
- 0
tests/src/org/aspectj/systemtest/ajc150/ajc150.xml View File

@@ -37,6 +37,18 @@
</run>
</ajc-test>
<ajc-test dir="bugs150" pr="104220" title="adviceexecution join point toString forms">
<compile files="Pr104220.aj"/>
<run class="Pr104220">
<stdout>
<line text="adviceexecution"/>
<line text="adviceexecution(void SomeAspect.before())"/>
<line text="adviceexecution(SomeAspect.before())"/>
<line text="adviceexecution(void SomeAspect.before())"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs150/pr113066" title="possible static imports bug - 1">
<compile files="Consts.java,TestNPE.java" options="-1.5"/>
</ajc-test>

Loading…
Cancel
Save