summaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-27 15:49:49 +0000
committeraclement <aclement>2005-10-27 15:49:49 +0000
commit2da9b31be2c1e5af9d33b25be798f3a47362fb88 (patch)
treeb4d01bfd737ce18060059f4a052938a632753522 /tests/bugs150
parent6ab78ee0e1d49a0e3f882ddf604061dc572cb427 (diff)
downloadaspectj-2da9b31be2c1e5af9d33b25be798f3a47362fb88.tar.gz
aspectj-2da9b31be2c1e5af9d33b25be798f3a47362fb88.zip
testcode and fixes for pr99191: thanks to Helen.
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/pr99191/pr99191_1.java10
-rw-r--r--tests/bugs150/pr99191/pr99191_2.java14
-rw-r--r--tests/bugs150/pr99191/pr99191_3.java10
-rw-r--r--tests/bugs150/pr99191/pr99191_4.java16
-rw-r--r--tests/bugs150/pr99191/pr99191_5.java10
-rw-r--r--tests/bugs150/pr99191/pr99191_6.java15
6 files changed, 75 insertions, 0 deletions
diff --git a/tests/bugs150/pr99191/pr99191_1.java b/tests/bugs150/pr99191/pr99191_1.java
new file mode 100644
index 000000000..f716b2748
--- /dev/null
+++ b/tests/bugs150/pr99191/pr99191_1.java
@@ -0,0 +1,10 @@
+@interface Annotation{}
+aspect B {
+
+ declare @field : int C.noSuchField : @Annotation; // should be an error
+ declare @field : int B.noSuchField : @Annotation; // should be an error
+
+}
+
+class C {
+}
diff --git a/tests/bugs150/pr99191/pr99191_2.java b/tests/bugs150/pr99191/pr99191_2.java
new file mode 100644
index 000000000..aca5b53f2
--- /dev/null
+++ b/tests/bugs150/pr99191/pr99191_2.java
@@ -0,0 +1,14 @@
+@interface Annotation{}
+aspect B {
+ declare @field : int C.anotherField : @Annotation; // should be woven
+ declare @field : int someField : @Annotation; // shouldn't have any errors
+ declare @field : int C.aField : @Annotation; // shouldn't have any errors
+}
+
+class C {
+ @Annotation int aField = 1;
+}
+
+aspect D {
+ public int C.anotherField;
+}
diff --git a/tests/bugs150/pr99191/pr99191_3.java b/tests/bugs150/pr99191/pr99191_3.java
new file mode 100644
index 000000000..40bbbcad0
--- /dev/null
+++ b/tests/bugs150/pr99191/pr99191_3.java
@@ -0,0 +1,10 @@
+@interface Annotation{}
+aspect B {
+
+ declare @method : public * C.noSuchMethod(..) : @Annotation; // should be an error
+ declare @method : * B.noSuchMethod(..) : @Annotation; // should be an error
+
+}
+
+class C {
+}
diff --git a/tests/bugs150/pr99191/pr99191_4.java b/tests/bugs150/pr99191/pr99191_4.java
new file mode 100644
index 000000000..600e804ce
--- /dev/null
+++ b/tests/bugs150/pr99191/pr99191_4.java
@@ -0,0 +1,16 @@
+@interface Annotation{}
+aspect B {
+ declare @method : public void C.anotherMethod(..) : @Annotation; // shouldn't have any errors
+ declare @method : * someMethod(..) : @Annotation; // shouldn't have any errors
+ declare @method : public void C.amethod(..) : @Annotation; // already get a warning for this, don't want an error saying method doesn't exist
+}
+
+class C {
+ @Annotation public void amethod() {
+ }
+}
+
+aspect D {
+ public void C.anotherMethod() {
+ }
+}
diff --git a/tests/bugs150/pr99191/pr99191_5.java b/tests/bugs150/pr99191/pr99191_5.java
new file mode 100644
index 000000000..71a697316
--- /dev/null
+++ b/tests/bugs150/pr99191/pr99191_5.java
@@ -0,0 +1,10 @@
+@interface Annotation{}
+aspect B {
+
+ declare @constructor : C.new(String) : @Annotation; // should be an error
+ declare @constructor : B.new(int) : @Annotation; // should be an error
+
+}
+
+class C {
+}
diff --git a/tests/bugs150/pr99191/pr99191_6.java b/tests/bugs150/pr99191/pr99191_6.java
new file mode 100644
index 000000000..4f176bb66
--- /dev/null
+++ b/tests/bugs150/pr99191/pr99191_6.java
@@ -0,0 +1,15 @@
+@interface Annotation{}
+aspect B {
+ declare @constructor : C.new(String) : @Annotation; // shouldn't have any errors
+ declare @constructor : *.new(int) : @Annotation; // shouldn't have any errors
+ declare @constructor : *.new(int) : @Annotation; // already get a warning for this, don't want an error saying method doesn't exist
+}
+
+class C {
+ @Annotation public C(int i) {
+ }
+}
+
+aspect D {
+ public C.new(String s){}
+}