aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs160/pr214559
diff options
context:
space:
mode:
authoraclement <aclement>2008-02-20 21:07:44 +0000
committeraclement <aclement>2008-02-20 21:07:44 +0000
commit09bd9cbc83d87fa910e323003707a1ae95a96750 (patch)
treef78066032cdc093ffed8113603cbd74313465c30 /tests/bugs160/pr214559
parentf836185807e97bdd7f300a5f615b6234b84d1ee6 (diff)
downloadaspectj-09bd9cbc83d87fa910e323003707a1ae95a96750.tar.gz
aspectj-09bd9cbc83d87fa910e323003707a1ae95a96750.zip
214559: tests and fix: cope with varying orderings for interdependant declare parents statements.
Diffstat (limited to 'tests/bugs160/pr214559')
-rw-r--r--tests/bugs160/pr214559/DeclareParentsPrecedenceTest.java8
-rw-r--r--tests/bugs160/pr214559/Interface1.java1
-rw-r--r--tests/bugs160/pr214559/Interface1TestClass.java1
-rw-r--r--tests/bugs160/pr214559/TestAspect.java7
-rw-r--r--tests/bugs160/pr214559/TestClass.java1
-rw-r--r--tests/bugs160/pr214559/X.java23
-rw-r--r--tests/bugs160/pr214559/Y.java20
7 files changed, 61 insertions, 0 deletions
diff --git a/tests/bugs160/pr214559/DeclareParentsPrecedenceTest.java b/tests/bugs160/pr214559/DeclareParentsPrecedenceTest.java
new file mode 100644
index 000000000..fdf77f02c
--- /dev/null
+++ b/tests/bugs160/pr214559/DeclareParentsPrecedenceTest.java
@@ -0,0 +1,8 @@
+
+public class DeclareParentsPrecedenceTest {
+ public static void main(String[]argv) {
+ TestClass t = new TestClass();
+ if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
+ if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
+ }
+}
diff --git a/tests/bugs160/pr214559/Interface1.java b/tests/bugs160/pr214559/Interface1.java
new file mode 100644
index 000000000..5ad8405b8
--- /dev/null
+++ b/tests/bugs160/pr214559/Interface1.java
@@ -0,0 +1 @@
+interface Interface1 {}
diff --git a/tests/bugs160/pr214559/Interface1TestClass.java b/tests/bugs160/pr214559/Interface1TestClass.java
new file mode 100644
index 000000000..ae149a479
--- /dev/null
+++ b/tests/bugs160/pr214559/Interface1TestClass.java
@@ -0,0 +1 @@
+interface Interface1TestClass {}
diff --git a/tests/bugs160/pr214559/TestAspect.java b/tests/bugs160/pr214559/TestAspect.java
new file mode 100644
index 000000000..65356014d
--- /dev/null
+++ b/tests/bugs160/pr214559/TestAspect.java
@@ -0,0 +1,7 @@
+aspect TestAspect {
+ declare parents:
+ TestClass implements Interface1;
+
+ declare parents:
+ TestClass && Interface1+ implements Interface1TestClass;
+}
diff --git a/tests/bugs160/pr214559/TestClass.java b/tests/bugs160/pr214559/TestClass.java
new file mode 100644
index 000000000..90caf0722
--- /dev/null
+++ b/tests/bugs160/pr214559/TestClass.java
@@ -0,0 +1 @@
+class TestClass {}
diff --git a/tests/bugs160/pr214559/X.java b/tests/bugs160/pr214559/X.java
new file mode 100644
index 000000000..7f2861b53
--- /dev/null
+++ b/tests/bugs160/pr214559/X.java
@@ -0,0 +1,23 @@
+
+package test;
+
+public class X {
+ public static void main(String[]argv) {
+ TestClass t = new TestClass();
+ if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
+ if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
+ }
+}
+
+interface Interface1 {}
+
+interface Interface1TestClass {}
+
+aspect TestAspect {
+ declare parents:
+ TestClass implements Interface1;
+
+ declare parents:
+ TestClass && Interface1+ implements Interface1TestClass;
+}
+class TestClass {}
diff --git a/tests/bugs160/pr214559/Y.java b/tests/bugs160/pr214559/Y.java
new file mode 100644
index 000000000..c1efa1e92
--- /dev/null
+++ b/tests/bugs160/pr214559/Y.java
@@ -0,0 +1,20 @@
+
+public class Y {
+ public static void main(String[]argv) {
+ TestClass t = new TestClass();
+ if (!(t instanceof Interface1)) throw new RuntimeException("t not instanceof Interface1");
+ if (!(t instanceof Interface1TestClass)) throw new RuntimeException("t not instanceof Interface1TestClass");
+ }
+}
+
+interface Interface1 {}
+
+interface Interface1TestClass {}
+
+aspect TestAspect {
+ declare parents: TestClass implements Interface1;
+
+ declare parents: TestClass && Interface1+ implements Interface1TestClass;
+}
+
+class TestClass {}