aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs151/pr126560
diff options
context:
space:
mode:
authoraclement <aclement>2006-03-28 09:34:35 +0000
committeraclement <aclement>2006-03-28 09:34:35 +0000
commit4cbd5456f8d8886579970939d58992d32a1746bd (patch)
tree9cf7e35793a81cc6ffe2b66d95287d300d6ea9b7 /tests/bugs151/pr126560
parent41f1f3a4174de86413942cd8f2c2e7c45d9824d7 (diff)
downloadaspectj-4cbd5456f8d8886579970939d58992d32a1746bd.tar.gz
aspectj-4cbd5456f8d8886579970939d58992d32a1746bd.zip
test and fix for 126560 (@AJ types resolved in 'current package') and test for 132349
Diffstat (limited to 'tests/bugs151/pr126560')
-rw-r--r--tests/bugs151/pr126560/pkg1/A.java16
-rw-r--r--tests/bugs151/pr126560/pkg1/C.java11
-rw-r--r--tests/bugs151/pr126560/pkg2/InOneFile.java27
3 files changed, 54 insertions, 0 deletions
diff --git a/tests/bugs151/pr126560/pkg1/A.java b/tests/bugs151/pr126560/pkg1/A.java
new file mode 100644
index 000000000..ac91d7b7e
--- /dev/null
+++ b/tests/bugs151/pr126560/pkg1/A.java
@@ -0,0 +1,16 @@
+package pkg1;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.DeclareWarning;
+import org.aspectj.lang.annotation.DeclareError;
+
+@Aspect
+public class A {
+
+ @DeclareWarning("execution(* C.warningMethod())")
+ static final String warning = "warning";
+
+ @DeclareError("execution(* C.badMethod())")
+ static final String error = "error";
+
+}
diff --git a/tests/bugs151/pr126560/pkg1/C.java b/tests/bugs151/pr126560/pkg1/C.java
new file mode 100644
index 000000000..8bb6fc5af
--- /dev/null
+++ b/tests/bugs151/pr126560/pkg1/C.java
@@ -0,0 +1,11 @@
+package pkg1;
+
+public class C {
+
+ public void warningMethod() {
+ }
+
+ public void badMethod() {
+ }
+
+}
diff --git a/tests/bugs151/pr126560/pkg2/InOneFile.java b/tests/bugs151/pr126560/pkg2/InOneFile.java
new file mode 100644
index 000000000..bd11fd1e8
--- /dev/null
+++ b/tests/bugs151/pr126560/pkg2/InOneFile.java
@@ -0,0 +1,27 @@
+package pkg2;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.DeclareWarning;
+import org.aspectj.lang.annotation.DeclareError;
+
+public class InOneFile {
+
+ public void hello() {}
+
+ public void hi() {}
+
+ public void target() {
+ hello();
+ hi();
+ }
+
+ @Aspect
+ public static class DeowAspect {
+
+ @DeclareWarning("call(* InOneFile.hello())")
+ final static String onHello = "call hello";
+
+ @DeclareError("call(* InOneFile.hi())")
+ final static String onHi = "call hi";
+ }
+}