diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs160/pr214559/DeclareParentsPrecedenceTest.java | 8 | ||||
-rw-r--r-- | tests/bugs160/pr214559/Interface1.java | 1 | ||||
-rw-r--r-- | tests/bugs160/pr214559/Interface1TestClass.java | 1 | ||||
-rw-r--r-- | tests/bugs160/pr214559/TestAspect.java | 7 | ||||
-rw-r--r-- | tests/bugs160/pr214559/TestClass.java | 1 | ||||
-rw-r--r-- | tests/bugs160/pr214559/X.java | 23 | ||||
-rw-r--r-- | tests/bugs160/pr214559/Y.java | 20 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java | 5 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc160/ajc160.xml | 15 |
9 files changed, 80 insertions, 1 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 {} diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java index 3c49de7fc..b35347709 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java @@ -28,7 +28,10 @@ public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testGenericsSuperITD_pr206911() { runTest("generics super itd"); } public void testGenericsSuperITD_pr206911_2() { runTest("generics super itd - 2"); } public void testSerializationAnnotationStyle_pr216311() { runTest("serialization and annotation style");} - + public void testDecpRepetition_pr214559() { runTest("decp repetition problem");} // all code in one file + public void testDecpRepetition_pr214559_2() { runTest("decp repetition problem - 2");} // all code in one file, default package + public void testDecpRepetition_pr214559_3() { runTest("decp repetition problem - 3");} // across multiple files + ///////////////////////////////////////// public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class); diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml index 99cb1b17d..fdf8f0dd9 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml +++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml @@ -45,5 +45,20 @@ <compile options="-1.5" files="PersistabilityTest.java,IPersistable.java,Persistability.java"/> <run class="PersistabilityTest"/> </ajc-test> + + <ajc-test dir="bugs160/pr214559" title="decp repetition problem"> + <compile files="X.java"/> + <run class="test.X"/> + </ajc-test> + + <ajc-test dir="bugs160/pr214559" title="decp repetition problem - 2"> + <compile files="Y.java"/> + <run class="Y"/> + </ajc-test> + + <ajc-test dir="bugs160/pr214559" title="decp repetition problem - 3"> + <compile files="TestClass.java Interface1.java Interface1TestClass.java DeclareParentsPrecedenceTest.java TestAspect.java"/> + <run class="DeclareParentsPrecedenceTest"/> + </ajc-test> </suite>
\ No newline at end of file |