--- /dev/null
+// HasMethod with anno value matching
+
+@interface I {
+ int i();
+}
+aspect A {
+ declare parents: hasmethod(@I(i=5) * *(..)) implements java.io.Serializable;
+}
+
+class B {
+@I(i=5) public void m() {}
+}
+class C {
+@I(i=6) public void m() {}
+}
+
--- /dev/null
+// HasMethod with anno value matching
+
+@interface I {
+ boolean b();
+}
+aspect A {
+ declare parents: hasmethod(@I(b=true) * *(..)) implements java.io.Serializable;
+}
+
+class B {
+@I(b=true) public void m() {}
+}
+class C {
+@I(b=false) public void m() {}
+}
+
*/
public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ // AspectH1.6.0rc1
+ public void testHasMethodAnnoValueInt_various() { runTest("hasmethod anno value - I");}
+ public void testHasMethodAnnoValueBoolean_various() { runTest("hasmethod anno value - Z");}
+
+ // AspectJ1.6.0m2 and earlier
public void testBoundsCheckShouldFail_pr219298() { runTest("bounds check failure");}
public void testBoundsCheckShouldFail_pr219298_2() { runTest("bounds check failure - 2");}
public void testGenericMethodMatching_pr204505_1() { runTest("generics method matching - 1");}
<!-- AspectJ v1.6.0 Tests -->
<suite>
+ <ajc-test dir="bugs160/various" title="hasmethod anno value - I">
+ <compile options="-1.5 -XhasMember -showWeaveInfo" files="A.java">
+ <message kind="weave" text="Extending interface set for type 'B' (A.java) to include 'java.io.Serializable' (A.java)"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/various" title="hasmethod anno value - Z">
+ <compile options="-1.5 -XhasMember -showWeaveInfo" files="Z.java">
+ <message kind="weave" text="Extending interface set for type 'B' (Z.java) to include 'java.io.Serializable' (Z.java)"/>
+ </compile>
+ </ajc-test>
+
<ajc-test dir="bugs160/various" title="hasmethod semantics">
<compile options="-1.5 -XhasMember -Xlint:ignore" files="HasMethodSemantics.java"/>
<run class="HasMethodSemantics">