Selaa lähdekoodia

test for Bug 29691

   Static inner aspects cannot reference user defined pointcuts
tags/V_1_1_b5
jhugunin 21 vuotta sitten
vanhempi
commit
727c1ccdcf
3 muutettua tiedostoa jossa 37 lisäystä ja 1 poistoa
  1. 6
    0
      tests/ajcTests.xml
  2. 19
    0
      tests/bugs/PcdLookup.java
  3. 12
    1
      tests/jimTests.xml

+ 6
- 0
tests/ajcTests.xml Näytä tiedosto

<message kind="error" line="6"/> <message kind="error" line="6"/>
</compile> </compile>
</ajc-test> </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> </suite>

+ 19
- 0
tests/bugs/PcdLookup.java Näytä tiedosto

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 Näytä tiedosto

<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"> <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite> <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> </suite>

Loading…
Peruuta
Tallenna