aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2011-05-12 19:55:28 +0000
committeraclement <aclement>2011-05-12 19:55:28 +0000
commit71608e1577185ba16a587a09f1e5bd60e08bf307 (patch)
tree5a545581d930634d50c132bec03c9735f4cbce8e /tests
parent999d3836f0b541f619f50580d2aca8316485ecb7 (diff)
downloadaspectj-71608e1577185ba16a587a09f1e5bd60e08bf307.tar.gz
aspectj-71608e1577185ba16a587a09f1e5bd60e08bf307.zip
345172
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs1612/pr345172/InterType3.java44
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml14
3 files changed, 66 insertions, 0 deletions
diff --git a/tests/bugs1612/pr345172/InterType3.java b/tests/bugs1612/pr345172/InterType3.java
new file mode 100644
index 000000000..7e88245c4
--- /dev/null
+++ b/tests/bugs1612/pr345172/InterType3.java
@@ -0,0 +1,44 @@
+import static java.lang.annotation.ElementType.*;
+import java.lang.annotation.*;
+
+public aspect InterType3 {
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({METHOD})
+ public @interface MyAnnotation {
+ }
+
+ public static aspect AroundMethod {
+ Object around() : execution(@MyAnnotation * * (..)) {
+ System.out.println(thisJoinPointStaticPart);
+ return proceed();
+ }
+ }
+
+ public interface InterTypeIfc {}
+
+ // (1)
+ @MyAnnotation
+ public void InterTypeIfc.m1(int p1, String p2) {}
+
+ // (2)
+ public void InterTypeIfc.m1(int p1, int p2) {}
+
+ // (3)
+// @MyAnnotation
+// public void m1(int p1) {}
+
+ // (4)
+// public void m1(int p1, int p2) {}
+
+
+ public static void main(String []argv) throws Exception {
+ new Foo().m1(1,"a");
+ new Foo().m1(1,2);
+ }
+
+ declare parents: Foo implements InterTypeIfc;
+
+ static class Foo {
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
index fe57fe8a3..eacd2b7ab 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc1612/Ajc1612Tests.java
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ // public void testAnnoCopying_345515() {
+ // runTest("anno copying");
+ // }
+
public void testIncorrectAnnos_345172() {
runTest("incorrect annos");
}
@@ -29,6 +33,10 @@ public class Ajc1612Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("incorrect annos 2");
}
+ public void testIncorrectAnnos_345172_3() {
+ runTest("incorrect annos 3");
+ }
+
public void testSyntheticMethods_327867() {
runTest("synthetic methods");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
index 4a9ee26a7..2b296fa81 100644
--- a/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
+++ b/tests/src/org/aspectj/systemtest/ajc1612/ajc1612.xml
@@ -2,6 +2,11 @@
<suite>
+<ajc-test dir="bugs1612/pr345515" title="anno copying">
+<compile files="Code.java" options="-1.5"/>
+<run class="Code"></run>
+</ajc-test>
+
<ajc-test dir="bugs1612/pr327867" title="synthetic methods">
<compile files="Foo.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'method-execution(void Foo.main(java.lang.String[]))' in Type 'Foo' (Foo.java:3) advised by before advice from 'X' (Foo.java:17)"/>
@@ -32,6 +37,15 @@
</stdout></run>
</ajc-test>
+<ajc-test dir="bugs1612/pr345172" title="incorrect annos 3">
+<compile files="InterType3.java" options="-1.5">
+</compile>
+<run class="InterType3">
+<stdout>
+<line text="execution(void InterType3.InterTypeIfc.m1(int, String))"/>
+</stdout></run>
+</ajc-test>
+