Browse Source

test for Bug 29691

   Static inner aspects cannot reference user defined pointcuts
tags/V_1_1_b5
jhugunin 21 years ago
parent
commit
727c1ccdcf
3 changed files with 37 additions and 1 deletions
  1. 6
    0
      tests/ajcTests.xml
  2. 19
    0
      tests/bugs/PcdLookup.java
  3. 12
    1
      tests/jimTests.xml

+ 6
- 0
tests/ajcTests.xml View File

@@ -5527,4 +5527,10 @@
<message kind="error" line="6"/>
</compile>
</ajc-test>
<ajc-test dir="bugs" pr="29691"
title="Static inner aspects cannot reference user defined pointcuts">
<compile files="PcdLookup.java" />
<run class="PcdLookup"/>
</ajc-test>
</suite>

+ 19
- 0
tests/bugs/PcdLookup.java View File

@@ -0,0 +1,19 @@
import org.aspectj.testing.Tester;

/** @testcase Bugzilla Bug 29691
Static inner aspects cannot reference user defined pointcuts
*/
public class PcdLookup {

public static void main(String[] args) {
}
public static aspect Referencer {
pointcut mainCall() : call(void main(..));
pointcut myMainCall() : mainCall() && outer();
}
pointcut outer(): within(PcdLookup);
}


+ 12
- 1
tests/jimTests.xml View File

@@ -1,7 +1,18 @@
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite>

<ajc-test dir="bugs" pr="29691"
title="Static inner aspects cannot reference user defined pointcuts">
<compile files="PcdLookup.java" />
<run class="PcdLookup"/>
</ajc-test>

<!--
<ajc-test dir="new"
title="work nicely with inner class method look-up rules and call-site advice"
keywords="from-resolved_10x">
<compile files="InnerMethods.java"/>
<run class="InnerMethods"/>
</ajc-test>
-->
</suite>

Loading…
Cancel
Save