Browse Source

tests for pr78707, before returning and before throwing advice

tags/V1_5_0M3
acolyer 19 years ago
parent
commit
b2b46ce365

+ 11
- 0
tests/bugs150/pr78707.aj View File

@@ -0,0 +1,11 @@
public aspect pr78707 {
before() returning : execution(* *(..)) {
// yeah, right!
}
before() throwing : execution(* *(..)) {
System.out.println("I'm not flippin' phsycic you know!");
}
}

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

@@ -226,6 +226,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("before and after are valid identifiers in classes");
}
public void testNoBeforeReturningAdvice() {
runTest("before returning advice not allowed!");
}
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {

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

@@ -67,6 +67,13 @@
</compile>
</ajc-test>
<ajc-test dir="bugs150" pr="78707" title="before returning advice not allowed!">
<compile files="pr78707.aj">
<message line="3" kind="error" text="Syntax error on token &quot;returning&quot;, delete this token"/>
<message line="3" kind="error" text="Syntax error on token &quot;throwing&quot;, delete this token"/>
</compile>
</ajc-test>
<ajc-test dir="bugs150" pr="107059" title="parser crashes on call(void (@a *)(..)">
<compile files="pr107059.aj">
<message line="3" kind="error" text="Syntax error on token &quot;(&quot;, &quot;name pattern&quot; expected"/>

Loading…
Cancel
Save