aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-03-03 17:23:18 +0000
committeraclement <aclement>2008-03-03 17:23:18 +0000
commit182a728ab782b94f5c0f8efb1536fb4f5b913e9c (patch)
tree4ed7d0f04975e82f85769547d0702fa4104d3a3e
parentfca2a297a2c9bbb432280280e68c5619fda13fb6 (diff)
downloadaspectj-182a728ab782b94f5c0f8efb1536fb4f5b913e9c.tar.gz
aspectj-182a728ab782b94f5c0f8efb1536fb4f5b913e9c.zip
annotation value matching in decp
-rw-r--r--tests/bugs160/various/A.java16
-rw-r--r--tests/bugs160/various/Z.java16
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java5
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml12
4 files changed, 49 insertions, 0 deletions
diff --git a/tests/bugs160/various/A.java b/tests/bugs160/various/A.java
new file mode 100644
index 000000000..d09cdcf8e
--- /dev/null
+++ b/tests/bugs160/various/A.java
@@ -0,0 +1,16 @@
+// 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() {}
+}
+
diff --git a/tests/bugs160/various/Z.java b/tests/bugs160/various/Z.java
new file mode 100644
index 000000000..4fb0cb1f2
--- /dev/null
+++ b/tests/bugs160/various/Z.java
@@ -0,0 +1,16 @@
+// 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() {}
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
index d3bd8e1b6..cf88304c2 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
@@ -20,6 +20,11 @@ import junit.framework.Test;
*/
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");}
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
index 09da1df88..35bc56a79 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
@@ -3,6 +3,18 @@
<!-- 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">