aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2007-11-08 08:58:21 +0000
committeraclement <aclement>2007-11-08 08:58:21 +0000
commit20c4e096716f935fdcf8b5d42135a9b101480a82 (patch)
tree4684bd9da4b5a29a928eab0fcd8e22192e21d8ef
parentabcce5cc64578187586156530c7a7f56fcd63c6c (diff)
downloadaspectj-20c4e096716f935fdcf8b5d42135a9b101480a82.tar.gz
aspectj-20c4e096716f935fdcf8b5d42135a9b101480a82.zip
more testcode for 169432
-rw-r--r--tests/bugs154/pr169432/case1/ClassThatAlreadyIncludesRequiredMethods.java (renamed from tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java)0
-rw-r--r--tests/bugs154/pr169432/case1/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java (renamed from tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java)0
-rw-r--r--tests/bugs154/pr169432/case1/NonMarkerInterface.java (renamed from tests/bugs154/pr169432/NonMarkerInterface.java)0
-rw-r--r--tests/bugs154/pr169432/case2/A.java26
-rw-r--r--tests/bugs154/pr169432/case3/A.java36
5 files changed, 62 insertions, 0 deletions
diff --git a/tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java b/tests/bugs154/pr169432/case1/ClassThatAlreadyIncludesRequiredMethods.java
index 1667496c5..1667496c5 100644
--- a/tests/bugs154/pr169432/ClassThatAlreadyIncludesRequiredMethods.java
+++ b/tests/bugs154/pr169432/case1/ClassThatAlreadyIncludesRequiredMethods.java
diff --git a/tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java b/tests/bugs154/pr169432/case1/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java
index 4d63e4871..4d63e4871 100644
--- a/tests/bugs154/pr169432/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java
+++ b/tests/bugs154/pr169432/case1/DeclareParentsForNonMarkerInterfaceToAClassThatAlreadyIncludeRequiredMethods.java
diff --git a/tests/bugs154/pr169432/NonMarkerInterface.java b/tests/bugs154/pr169432/case1/NonMarkerInterface.java
index 753ad61ee..753ad61ee 100644
--- a/tests/bugs154/pr169432/NonMarkerInterface.java
+++ b/tests/bugs154/pr169432/case1/NonMarkerInterface.java
diff --git a/tests/bugs154/pr169432/case2/A.java b/tests/bugs154/pr169432/case2/A.java
new file mode 100644
index 000000000..b5f533caf
--- /dev/null
+++ b/tests/bugs154/pr169432/case2/A.java
@@ -0,0 +1,26 @@
+
+// Should error, the types C1 and C2 don't implement the interface and no defaultImpl was supplied
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect class X {
+ @DeclareParents(value="C*")
+ public NonMarkerInterface nmi;
+}
+
+interface NonMarkerInterface {
+ public int m();
+}
+
+class Y implements NonMarkerInterface {
+ public Y() {}
+ public int m() { return 43;}
+}
+
+class C1 {
+
+}
+
+class C2 {
+
+}
diff --git a/tests/bugs154/pr169432/case3/A.java b/tests/bugs154/pr169432/case3/A.java
new file mode 100644
index 000000000..e5700a38c
--- /dev/null
+++ b/tests/bugs154/pr169432/case3/A.java
@@ -0,0 +1,36 @@
+
+// Now C1 and C2 implement the interface
+
+import org.aspectj.lang.annotation.*;
+
+public class A {
+ public static void main(String []argv) {
+ C1 c1 = new C1();
+ System.out.println("C1.m() returns "+((NonMarkerInterface)c1).m());
+ C2 c2 = new C2();
+ System.out.println("C2.m() returns "+((NonMarkerInterface)c2).m());
+ }
+}
+
+@Aspect class X {
+ @DeclareParents(value="C*")
+ public NonMarkerInterface nmi;
+}
+
+interface NonMarkerInterface {
+ public int m();
+}
+
+class Y implements NonMarkerInterface {
+ public Y() {}
+ public int m() { return 43;}
+}
+
+class C1 {
+ public int m() { return 1;}
+
+}
+
+class C2 {
+ public int m() { return 2;}
+}